update neovim with a better statusline, bufferline, and some more polish

This commit is contained in:
Tony Blyler 2021-12-04 12:27:57 -05:00
parent acf460fae2
commit 9d35ac8960
Signed by: tblyler
GPG key ID: 7F13D9A60C0D678E
10 changed files with 35 additions and 13 deletions

View file

@ -111,7 +111,7 @@ font:
# - (macOS) Menlo # - (macOS) Menlo
# - (Linux/BSD) monospace # - (Linux/BSD) monospace
# - (Windows) Consolas # - (Windows) Consolas
family: Source Code Pro family: SauceCodePro Nerd Font Mono
# The `style` can be specified to pick a specific face. # The `style` can be specified to pick a specific face.
#style: Regular #style: Regular

View file

@ -1,4 +1,4 @@
require('plugins')
require('settings') require('settings')
require('plugins')
require('mappings') require('mappings')
require('autocmd') require('autocmd')

View file

@ -0,0 +1 @@
require("bufferline").setup()

View file

@ -2,7 +2,6 @@ require("gitsigns").setup {
current_line_blame = true, current_line_blame = true,
current_line_blame_opts = { current_line_blame_opts = {
virt_text = true, virt_text = true,
virt_text_pos = "right_align",
delay = 0, delay = 0,
}, },
} }

View file

@ -0,0 +1,10 @@
local lightbulb = require("nvim-lightbulb")
lightbulb.get_status_text()
lightbulb.update_lightbulb({
status_text = {
enabled = true,
text = "💡",
text_unavailble = "",
}
})

View file

@ -38,6 +38,11 @@ local on_attach = function(client, bufnr)
buf_set_keymap('n', '<space>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts) buf_set_keymap('n', '<space>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
buf_set_keymap('n', '<space>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts) buf_set_keymap('n', '<space>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
require("lsp-status").on_attach(client) -- required for LSP status to function
local basics = require("lsp_basics") -- adds nice human accessible LSP commands
basics.make_lsp_commands(client, bufnr)
basics.make_lsp_mappings(client, bufnr)
local sources = { local sources = {
null_ls.builtins.formatting.gofumpt, null_ls.builtins.formatting.gofumpt,
null_ls.builtins.formatting.goimports, null_ls.builtins.formatting.goimports,

View file

@ -3,4 +3,3 @@ require("mini.comment").setup()
require("mini.cursorword").setup() require("mini.cursorword").setup()
require("mini.surround").setup() require("mini.surround").setup()
require("mini.trailspace").setup() require("mini.trailspace").setup()
require("mini.tabline").setup()

View file

@ -1,3 +1,2 @@
local statusline = require("statusline") local statusline = require('statusline')
statusline.tabline = false
statusline.tableline = false

View file

@ -11,7 +11,7 @@ require "paq" {
"morhetz/gruvbox"; -- gruvbox theme "morhetz/gruvbox"; -- gruvbox theme
"beauwilliams/statusline.lua"; -- status & tab line "kyazdani42/nvim-web-devicons"; -- per the name, fancy icons with a Nerd Font patched font
"lewis6991/gitsigns.nvim"; -- git gutter "lewis6991/gitsigns.nvim"; -- git gutter
"nvim-lua/plenary.nvim"; -- dependency of lewis6991/gitsigns.nvim, nvim-telescope/telescope.nvim "nvim-lua/plenary.nvim"; -- dependency of lewis6991/gitsigns.nvim, nvim-telescope/telescope.nvim
@ -20,7 +20,10 @@ require "paq" {
"phaazon/hop.nvim"; -- easymotion navigation "phaazon/hop.nvim"; -- easymotion navigation
"echasnovski/mini.nvim"; -- bunch of good small plugins: whitespace, buffer layout, commenting, surround, tabline, etc "beauwilliams/statusline.lua"; -- statusline
"akinsho/bufferline.nvim"; -- bufferline
"echasnovski/mini.nvim"; -- bunch of good small plugins: whitespace, buffer layout, commenting, surround, etc
{"nvim-treesitter/nvim-treesitter", run=TSUpdate}; -- nice and quick syntax tree {"nvim-treesitter/nvim-treesitter", run=TSUpdate}; -- nice and quick syntax tree
@ -29,12 +32,15 @@ require "paq" {
"kosayoda/nvim-lightbulb"; -- shows a light bulb like vs code for code actions "kosayoda/nvim-lightbulb"; -- shows a light bulb like vs code for code actions
"nvim-lua/lsp-status.nvim"; -- nice statusline components for LSP servers "nvim-lua/lsp-status.nvim"; -- nice statusline components for LSP servers
"tpope/vim-sleuth"; -- automatic tab/spaces detection
"rhysd/vim-grammarous"; -- grammar checking "rhysd/vim-grammarous"; -- grammar checking
-- LSP Server -- LSP Server
"neovim/nvim-lspconfig"; "neovim/nvim-lspconfig";
"williamboman/nvim-lsp-installer"; "williamboman/nvim-lsp-installer";
"jose-elias-alvarez/null-ls.nvim"; "jose-elias-alvarez/null-ls.nvim";
"nanotee/nvim-lsp-basics";
-- autocomplete with nvim-cmp -- autocomplete with nvim-cmp
"hrsh7th/cmp-nvim-lsp"; "hrsh7th/cmp-nvim-lsp";
@ -46,10 +52,13 @@ require "paq" {
"saadparwaiz1/cmp_luasnip"; "saadparwaiz1/cmp_luasnip";
} }
require("plugins.config.bufferline")
require("plugins.config.cmp") require("plugins.config.cmp")
require("plugins.config.gitsigns") require("plugins.config.gitsigns")
require("plugins.config.hop") require("plugins.config.hop")
require("plugins.config.indentblankline") require("plugins.config.indentblankline")
require("plugins.config.mini") require("plugins.config.lightbulb")
require("plugins.config.treesitter")
require("plugins.config.lspinstall") require("plugins.config.lspinstall")
require("plugins.config.mini")
require("plugins.config.statusline")
require("plugins.config.treesitter")

View file

@ -7,7 +7,7 @@ local cmd = vim.cmd
g.gruvbox_contrast_dark = "hard" -- hard contrast mode for gruvobx g.gruvbox_contrast_dark = "hard" -- hard contrast mode for gruvobx
opt.background = "dark" -- make sure dark mode is used opt.background = "dark" -- make sure dark mode is used
opt.termguicolors = true -- enable 24 bit colors
opt.mouse = 'c' -- disable mouse opt.mouse = 'c' -- disable mouse
opt.number = true -- show line numbers opt.number = true -- show line numbers
-- opt.cursorline = true -- highlight the line that the cursor is on -- opt.cursorline = true -- highlight the line that the cursor is on