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