mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 06:12:34 +00:00
Nvim updates
This commit is contained in:
@@ -45,8 +45,8 @@ end
|
||||
|
||||
-- Use a loop to conveniently call 'setup' on multiple servers and
|
||||
-- map buffer local keybindings when the language server attaches
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = require("cmp_nvim_lsp").update_capabilities(capabilities)
|
||||
--local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
local servers = {
|
||||
"gopls", "bashls", "jedi_language_server", "dockerls", "terraformls",
|
||||
@@ -147,35 +147,39 @@ for _, lsp in ipairs(servers) do
|
||||
})
|
||||
end
|
||||
|
||||
local sumneko_root_path = os.getenv("HOME") .. ".cache/lua-language-server"
|
||||
local sumneko_binary = "/usr/bin/lua-language-server"
|
||||
require"lspconfig".sumneko_lua.setup {
|
||||
cmd = {sumneko_binary, "-E", sumneko_root_path .. "/main.lua"},
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {version = "LuaJIT", path = vim.split(package.path, ";")},
|
||||
completion = {enable = true, callSnippet = "Both"},
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
globals = {"vim", "describe"},
|
||||
disable = {"lowercase-global"}
|
||||
},
|
||||
workspace = {
|
||||
library = {
|
||||
[vim.fn.expand("$VIMRUNTIME/lua")] = true,
|
||||
[vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true,
|
||||
[vim.fn.expand("/usr/share/awesome/lib")] = true
|
||||
},
|
||||
-- adjust these two values if your performance is not optimal
|
||||
maxPreload = 2000,
|
||||
preloadFileSize = 1000
|
||||
},
|
||||
telemetry = {enable = false}
|
||||
}
|
||||
}
|
||||
}
|
||||
-- Test source-kit
|
||||
--require'lspconfig'.sourcekit.setup{}
|
||||
|
||||
|
||||
-- local sumneko_root_path = os.getenv("HOME") .. ".cache/lua-language-server"
|
||||
-- local sumneko_binary = "/usr/bin/lua-language-server"
|
||||
-- require"lspconfig".sumneko_lua.setup {
|
||||
-- cmd = {sumneko_binary, "-E", sumneko_root_path .. "/main.lua"},
|
||||
-- capabilities = capabilities,
|
||||
-- on_attach = on_attach,
|
||||
-- settings = {
|
||||
-- Lua = {
|
||||
-- runtime = {version = "LuaJIT", path = vim.split(package.path, ";")},
|
||||
-- completion = {enable = true, callSnippet = "Both"},
|
||||
-- diagnostics = {
|
||||
-- enable = true,
|
||||
-- globals = {"vim", "describe"},
|
||||
-- disable = {"lowercase-global"}
|
||||
-- },
|
||||
-- workspace = {
|
||||
-- library = {
|
||||
-- [vim.fn.expand("$VIMRUNTIME/lua")] = true,
|
||||
-- [vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true,
|
||||
-- [vim.fn.expand("/usr/share/awesome/lib")] = true
|
||||
-- },
|
||||
-- -- 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
|
||||
|
||||
@@ -43,7 +43,7 @@ require("nvim-tree").setup {
|
||||
-- will not open on setup if the filetype is in this list
|
||||
ignore_ft_on_setup = {},
|
||||
-- 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
|
||||
open_on_tab = true,
|
||||
-- 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)
|
||||
update_cwd = true,
|
||||
-- this option hides files and folders starting with a dot `.`
|
||||
hide_dotfiles = true,
|
||||
--hide_dotfiles = true,
|
||||
-- show lsp diagnostics in the signcolumn
|
||||
diagnostics = {
|
||||
enabled = true,
|
||||
icon = {hint = "", info = "", warning = "", error = ""}
|
||||
enable = true,
|
||||
icons = {hint = "", info = "", warning = "", error = ""}
|
||||
},
|
||||
git = {ignore = true},
|
||||
-- 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 = "left",
|
||||
-- if true the tree will resize itself after opening a file
|
||||
auto_resize = true,
|
||||
--auto_resize = true,
|
||||
mappings = {
|
||||
-- custom only false will merge the list with the default mappings
|
||||
-- if true, it will only use your list to set the mappings
|
||||
|
||||
Reference in New Issue
Block a user