Neotree
This commit is contained in:
parent
8a93724792
commit
95732019df
@ -18,7 +18,7 @@ g.indent_blankline_show_trailing_blankline_indent = false
|
||||
g.indent_blankline_show_first_indent_level = true
|
||||
|
||||
require("indent_blankline").setup({
|
||||
space_char_blankline = " ",
|
||||
-- space_char_blankline = " ",
|
||||
show_current_context = true,
|
||||
show_current_context_start = true,
|
||||
})
|
||||
|
@ -6,45 +6,45 @@ local async = require("plenary.async")
|
||||
lsp_installer.setup({})
|
||||
|
||||
local required_servers = {
|
||||
"sumneko_lua",
|
||||
"rust_analyzer",
|
||||
"bashls",
|
||||
"eslint",
|
||||
"dockerls",
|
||||
"ansiblels",
|
||||
"tsserver",
|
||||
"yamlls",
|
||||
"jdtls",
|
||||
"html",
|
||||
"sumneko_lua",
|
||||
"rust_analyzer",
|
||||
"bashls",
|
||||
"eslint",
|
||||
"dockerls",
|
||||
"ansiblels",
|
||||
"tsserver",
|
||||
"yamlls",
|
||||
"jdtls",
|
||||
"html",
|
||||
}
|
||||
|
||||
for _, name in pairs(required_servers) do
|
||||
local server_is_found, server = lsp_installer.get_server(name)
|
||||
if server_is_found then
|
||||
if not server:is_installed() then
|
||||
async.run(function()
|
||||
vim.notify.async("Installing Language Server " .. name, "info", {
|
||||
title = "Lsp Installer",
|
||||
})
|
||||
end)
|
||||
server:install()
|
||||
end
|
||||
end
|
||||
local server_is_found, server = lsp_installer.get_server(name)
|
||||
if server_is_found then
|
||||
if not server:is_installed() then
|
||||
async.run(function()
|
||||
vim.notify.async("Installing Language Server " .. name, "info", {
|
||||
title = "Lsp Installer",
|
||||
})
|
||||
end)
|
||||
server:install()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function on_attach(client, bufnr)
|
||||
async.run(function()
|
||||
vim.notify.async("Attached server " .. client.name, "info", {
|
||||
title = "Lsp Attach",
|
||||
}).events.close()
|
||||
end)
|
||||
async.run(function()
|
||||
vim.notify.async("Attached server " .. client.name, "info", {
|
||||
title = "Lsp Attach",
|
||||
}).events.close()
|
||||
end)
|
||||
end
|
||||
|
||||
local opts = {
|
||||
-- Coq configuration, ensure coq actual has capabilties shown
|
||||
-- capabilities = require("coq").lsp_ensure_capabilities(vim.lsp.protocol.make_client_capabilities()),
|
||||
capabilities = require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities()),
|
||||
on_attach = on_attach,
|
||||
-- Coq configuration, ensure coq actual has capabilties shown
|
||||
-- capabilities = require("coq").lsp_ensure_capabilities(vim.lsp.protocol.make_client_capabilities()),
|
||||
capabilities = require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities()),
|
||||
on_attach = on_attach,
|
||||
}
|
||||
|
||||
-- INFO: RUST LSP
|
||||
@ -62,13 +62,13 @@ local codelldb_path = extension_path .. "adapter/codelldb"
|
||||
local liblldb_path = extension_path .. "lldb/lib/liblldb.dylib"
|
||||
|
||||
local rustopts = {
|
||||
server = opts,
|
||||
dap = {
|
||||
adapter = require("rust-tools.dap").get_codelldb_adapter(codelldb_path, liblldb_path),
|
||||
},
|
||||
tools = {
|
||||
hover_actions = { auto_focus = true },
|
||||
},
|
||||
server = opts,
|
||||
dap = {
|
||||
adapter = require("rust-tools.dap").get_codelldb_adapter(codelldb_path, liblldb_path),
|
||||
},
|
||||
tools = {
|
||||
hover_actions = { auto_focus = true },
|
||||
},
|
||||
}
|
||||
require("rust-tools").setup(rustopts)
|
||||
|
||||
@ -76,54 +76,58 @@ require("rust-tools").setup(rustopts)
|
||||
-- I use ansible a lot, define exceptions for servers that can use
|
||||
-- server:setup & vim.cmd at the bottom here
|
||||
lspconfig.ansiblels.setup({
|
||||
ansible = {
|
||||
ansible = {
|
||||
useFullyQualifiedCollectionNames = true,
|
||||
path = "ansible",
|
||||
},
|
||||
ansibleLint = {
|
||||
enabled = true,
|
||||
path = "ansible-lint",
|
||||
},
|
||||
python = {
|
||||
interpreterPath = "python3",
|
||||
},
|
||||
},
|
||||
ansible = {
|
||||
ansible = {
|
||||
useFullyQualifiedCollectionNames = true,
|
||||
path = "ansible",
|
||||
},
|
||||
ansibleLint = {
|
||||
enabled = true,
|
||||
path = "ansible-lint",
|
||||
},
|
||||
python = {
|
||||
interpreterPath = "python3",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- NOTE: BASH LSP
|
||||
lspconfig.bashls.setup({
|
||||
filetypes = {
|
||||
"zsh",
|
||||
"bash",
|
||||
"sh",
|
||||
},
|
||||
opts,
|
||||
filetypes = {
|
||||
"zsh",
|
||||
"bash",
|
||||
"sh",
|
||||
},
|
||||
opts,
|
||||
})
|
||||
|
||||
-- NOTE: PYTHON LSP
|
||||
lspconfig.pylsp.setup({
|
||||
pylsp = {
|
||||
plugins = {
|
||||
pycodestyle = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
opts,
|
||||
pylsp = {
|
||||
plugins = {
|
||||
pycodestyle = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
opts,
|
||||
})
|
||||
|
||||
-- NOTE: GENERIC LSP SERVERS
|
||||
for _, server in ipairs({
|
||||
"tsserver",
|
||||
"eslint",
|
||||
"dockerls",
|
||||
"sumneko_lua",
|
||||
"yamlls",
|
||||
"kotlin_language_server",
|
||||
"jdtls",
|
||||
"vuels",
|
||||
"html",
|
||||
}) do
|
||||
lspconfig[server].setup(opts)
|
||||
"tsserver",
|
||||
"eslint",
|
||||
"dockerls",
|
||||
"sumneko_lua",
|
||||
"yamlls",
|
||||
"kotlin_language_server",
|
||||
"jdtls",
|
||||
"vuels",
|
||||
"html",
|
||||
"vimls",
|
||||
"ccls",
|
||||
"clangd",
|
||||
"cmake",
|
||||
}) do
|
||||
lspconfig[server].setup(opts)
|
||||
end
|
||||
|
@ -2,5 +2,7 @@ local neotree = require("neo-tree")
|
||||
|
||||
vim.g.neo_tree_remove_legacy_commands = 1
|
||||
neotree.setup({
|
||||
use_libuv_file_watcher = true
|
||||
filesystem = {
|
||||
use_libuv_file_watcher = true,
|
||||
},
|
||||
})
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
local U = {}
|
||||
U.map = function(mode, lhs, rhs, opts)
|
||||
local options = { noremap = true }
|
||||
local options = { noremap = true, silent = true }
|
||||
if opts then
|
||||
options = vim.tbl_extend("force", options, opts)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user