Nvim updates

This commit is contained in:
2023-03-11 11:28:57 -05:00
parent fedae4bbe8
commit 4528c89adf
3 changed files with 42 additions and 38 deletions

View File

@@ -45,8 +45,8 @@ end
-- Use a loop to conveniently call 'setup' on multiple servers and -- Use a loop to conveniently call 'setup' on multiple servers and
-- map buffer local keybindings when the language server attaches -- map buffer local keybindings when the language server attaches
local capabilities = vim.lsp.protocol.make_client_capabilities() --local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require("cmp_nvim_lsp").update_capabilities(capabilities) capabilities = require("cmp_nvim_lsp").default_capabilities()
local servers = { local servers = {
"gopls", "bashls", "jedi_language_server", "dockerls", "terraformls", "gopls", "bashls", "jedi_language_server", "dockerls", "terraformls",
@@ -147,35 +147,39 @@ for _, lsp in ipairs(servers) do
}) })
end end
local sumneko_root_path = os.getenv("HOME") .. ".cache/lua-language-server" -- Test source-kit
local sumneko_binary = "/usr/bin/lua-language-server" --require'lspconfig'.sourcekit.setup{}
require"lspconfig".sumneko_lua.setup {
cmd = {sumneko_binary, "-E", sumneko_root_path .. "/main.lua"},
capabilities = capabilities, -- local sumneko_root_path = os.getenv("HOME") .. ".cache/lua-language-server"
on_attach = on_attach, -- local sumneko_binary = "/usr/bin/lua-language-server"
settings = { -- require"lspconfig".sumneko_lua.setup {
Lua = { -- cmd = {sumneko_binary, "-E", sumneko_root_path .. "/main.lua"},
runtime = {version = "LuaJIT", path = vim.split(package.path, ";")}, -- capabilities = capabilities,
completion = {enable = true, callSnippet = "Both"}, -- on_attach = on_attach,
diagnostics = { -- settings = {
enable = true, -- Lua = {
globals = {"vim", "describe"}, -- runtime = {version = "LuaJIT", path = vim.split(package.path, ";")},
disable = {"lowercase-global"} -- completion = {enable = true, callSnippet = "Both"},
}, -- diagnostics = {
workspace = { -- enable = true,
library = { -- globals = {"vim", "describe"},
[vim.fn.expand("$VIMRUNTIME/lua")] = true, -- disable = {"lowercase-global"}
[vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true, -- },
[vim.fn.expand("/usr/share/awesome/lib")] = true -- workspace = {
}, -- library = {
-- adjust these two values if your performance is not optimal -- [vim.fn.expand("$VIMRUNTIME/lua")] = true,
maxPreload = 2000, -- [vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true,
preloadFileSize = 1000 -- [vim.fn.expand("/usr/share/awesome/lib")] = true
}, -- },
telemetry = {enable = false} -- -- adjust these two values if your performance is not optimal
} -- maxPreload = 2000,
} -- preloadFileSize = 1000
} -- },
-- telemetry = {enable = false}
-- }
-- }
-- }
-- alternative to formatter but yamlfix is not working and I need this for respecting yamllint config -- alternative to formatter but yamlfix is not working and I need this for respecting yamllint config

View File

@@ -43,7 +43,7 @@ require("nvim-tree").setup {
-- will not open on setup if the filetype is in this list -- will not open on setup if the filetype is in this list
ignore_ft_on_setup = {}, ignore_ft_on_setup = {},
-- closes neovim automatically when the tree is the last **WINDOW** in the view -- closes neovim automatically when the tree is the last **WINDOW** in the view
auto_close = true, --auto_close = true,
-- opens the tree when changing/opening a new tab if the tree wasn't previously opened -- opens the tree when changing/opening a new tab if the tree wasn't previously opened
open_on_tab = true, open_on_tab = true,
-- hijack the cursor in the tree to put it at the start of the filename -- hijack the cursor in the tree to put it at the start of the filename
@@ -51,11 +51,11 @@ require("nvim-tree").setup {
-- updates the root directory of the tree on `DirChanged` (when your run `:cd` usually) -- updates the root directory of the tree on `DirChanged` (when your run `:cd` usually)
update_cwd = true, update_cwd = true,
-- this option hides files and folders starting with a dot `.` -- this option hides files and folders starting with a dot `.`
hide_dotfiles = true, --hide_dotfiles = true,
-- show lsp diagnostics in the signcolumn -- show lsp diagnostics in the signcolumn
diagnostics = { diagnostics = {
enabled = true, enable = true,
icon = {hint = "", info = "", warning = "", error = ""} icons = {hint = "", info = "", warning = "", error = ""}
}, },
git = {ignore = true}, git = {ignore = true},
-- update the focused file on `BufEnter`, un-collapses the folders recursively until it finds the file -- update the focused file on `BufEnter`, un-collapses the folders recursively until it finds the file
@@ -88,7 +88,7 @@ require("nvim-tree").setup {
-- side of the tree, can be one of 'left' | 'right' | 'top' | 'bottom' -- side of the tree, can be one of 'left' | 'right' | 'top' | 'bottom'
side = "left", side = "left",
-- if true the tree will resize itself after opening a file -- if true the tree will resize itself after opening a file
auto_resize = true, --auto_resize = true,
mappings = { mappings = {
-- custom only false will merge the list with the default mappings -- custom only false will merge the list with the default mappings
-- if true, it will only use your list to set the mappings -- if true, it will only use your list to set the mappings

View File

@@ -33,11 +33,11 @@ o.shiftwidth = 2 -- the number of spaces inserted for each indentation
o.tabstop = 2 -- how many columns a tab counts for o.tabstop = 2 -- how many columns a tab counts for
o.termguicolors = true -- set term gui colors (most terminals support this) o.termguicolors = true -- set term gui colors (most terminals support this)
o.cursorline = true -- highlight the current line o.cursorline = true -- highlight the current line
o.scrolloff = 3 -- Minimal number of screen lines to keep above and below the cursor o.scrolloff = 8 -- Minimal number of screen lines to keep above and below the cursor
o.sidescrolloff = 5 -- The minimal number of columns to scroll horizontally o.sidescrolloff = 5 -- The minimal number of columns to scroll horizontally
o.hlsearch = true -- highlight all matches on previous search pattern o.hlsearch = true -- highlight all matches on previous search pattern
o.ignorecase = true -- ignore case in search patterns o.ignorecase = true -- ignore case in search patterns
o.foldenable = true -- disable folding; enable with zi o.foldenable = false -- disable folding; enable with zi
o.foldmethod = "expr" o.foldmethod = "expr"
o.foldexpr = "nvim_treesitter#foldexpr()" o.foldexpr = "nvim_treesitter#foldexpr()"
-- o.listchars = "eol:¬,tab:>·,trail:~,extends:>,precedes:<" -- o.listchars = "eol:¬,tab:>·,trail:~,extends:>,precedes:<"