plenty of nvim fixes
This commit is contained in:
parent
717330a6e3
commit
5bc760c5d6
|
@ -744,6 +744,7 @@ M.standard_maps = function()
|
|||
desc = "Peek fold",
|
||||
}
|
||||
end
|
||||
|
||||
return maps
|
||||
end
|
||||
|
||||
|
|
|
@ -1,32 +1,30 @@
|
|||
local conf = { handlers = {} }
|
||||
local f = require("funcs")
|
||||
|
||||
-- https://github.com/bmewburn/intelephense-docs/blob/master/installation.md#configuration-options
|
||||
conf.handlers["intelephense"] = {
|
||||
init_options = {
|
||||
storagePath = os.getenv("XDG_CACHE_HOME") .. "/intelephense",
|
||||
globalStoragePath = os.getenv("XDG_CONFIG_HOME") .. "/intelephense",
|
||||
licenceKey = os.getenv("XDG_CONFIG_HOME") .. "/intelephense/license.txt",
|
||||
},
|
||||
conf.handlers.intelephense = {
|
||||
init_options = {
|
||||
storagePath = os.getenv("XDG_CACHE_HOME") .. "/intelephense",
|
||||
globalStoragePath = os.getenv("XDG_CONFIG_HOME") .. "/intelephense",
|
||||
licenceKey = f.get_lsp_key("intelephense")
|
||||
},
|
||||
}
|
||||
|
||||
conf.handlers["bashls"] = {
|
||||
settings = {
|
||||
bashIde = {
|
||||
shellcheckPath = vim.fn.stdpath("data") .. "mason/bin/shellcheck",
|
||||
},
|
||||
},
|
||||
conf.handlers.sourcery = {
|
||||
init_options = {
|
||||
token = f.get_lsp_key("sourcery")
|
||||
}
|
||||
}
|
||||
|
||||
conf.required = {
|
||||
"zk",
|
||||
"jsonls",
|
||||
"yamlls",
|
||||
"lua_ls",
|
||||
"bashls",
|
||||
"ansiblels",
|
||||
"dockerls",
|
||||
conf.handlers.bashls = {
|
||||
settings = {
|
||||
bashIde = {
|
||||
shellcheckPath = vim.fn.stdpath("data") .. "mason/bin/shellcheck",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
conf.required = { "lua_ls", "zk", "bashls" }
|
||||
|
||||
conf.ignore = { "rust_analyzer" } -- This will be set up by rustacean.nvim
|
||||
|
||||
conf.ignore = { "rust_analyzer" } -- This will be setup by rustacean.nvim
|
||||
return conf
|
||||
|
|
|
@ -39,10 +39,6 @@ o.title = true
|
|||
o.backspace = "indent,eol,start"
|
||||
o.termguicolors = true
|
||||
o.timeoutlen = 500
|
||||
o.foldenable = true
|
||||
o.foldmethod = "expr"
|
||||
o.foldlevelstart = 99
|
||||
o.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
o.number = true
|
||||
o.relativenumber = true
|
||||
o.laststatus = 3
|
||||
|
@ -50,4 +46,11 @@ o.modeline = true
|
|||
o.modelines = 3
|
||||
o.listchars = { eol = "¬", tab = "→ ", extends = "❯", precedes = "❮", trail = "·", nbsp = "␣" }
|
||||
|
||||
-- ufo needs these settings
|
||||
o.foldcolumn = "0"
|
||||
o.foldmethod = "manual"
|
||||
o.foldenable = true
|
||||
o.foldlevel = 99
|
||||
o.foldlevelstart = 99
|
||||
|
||||
d({ virtual_text = false })
|
||||
|
|
|
@ -322,4 +322,11 @@ function M.set_cwd()
|
|||
end
|
||||
end
|
||||
|
||||
function M.get_lsp_key(key)
|
||||
local ok, keys = pcall(require, "config.keys")
|
||||
if ok then
|
||||
return keys[key]
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
return {
|
||||
{ "neovim/nvim-lspconfig" },
|
||||
{ "folke/neoconf.nvim", config = true },
|
||||
{ "folke/neodev.nvim", config = true },
|
||||
{ "folke/neoconf.nvim" },
|
||||
{ "folke/neodev.nvim" },
|
||||
require("plugins.lsp.mason-lspconfig"),
|
||||
require("plugins.lsp.mason-null-ls"),
|
||||
require("plugins.lsp.null-ls"),
|
||||
|
|
|
@ -2,6 +2,12 @@ local M = { "williamboman/mason-lspconfig.nvim" }
|
|||
local f = require("funcs")
|
||||
local serverconf = require("config.lsp")
|
||||
|
||||
M.dependencies = { "mason.nvim", "neoconf.nvim", "neodev.nvim" }
|
||||
|
||||
M.event = { "BufReadPost", "BufNewFile", "BufNew" }
|
||||
|
||||
M.cmd = { "LspInstall", "LspUninstall" }
|
||||
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities.textDocument.completion.completionItem.documentationFormat = { "markdown", "plaintext" }
|
||||
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||
|
@ -21,13 +27,9 @@ local function merge(table, overwrite)
|
|||
return table and vim.tbl_deep_extend("force", table, overwrite) or overwrite
|
||||
end
|
||||
|
||||
M.dependencies = { "mason.nvim", "neoconf.nvim", "neodev.nvim" }
|
||||
|
||||
M.event = { "BufReadPost", "BufNewFile", "BufNew" }
|
||||
|
||||
M.cmd = { "LspInstall", "LspUninstall" }
|
||||
|
||||
M.config = function()
|
||||
require("neoconf").setup()
|
||||
require("neodev").setup()
|
||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "rounded", silent = true })
|
||||
vim.lsp.handlers["textDocument/signatureHelp"] =
|
||||
vim.lsp.with(vim.lsp.handlers.signature_help, { border = "rounded", silent = true })
|
||||
|
|
|
@ -3,3 +3,4 @@
|
|||
.local/share/xkb/compiled/keymap
|
||||
.config/nvim/lazy-lock.json
|
||||
.config/lazygit/state.yml
|
||||
.config/nvim/lua/config/keys.lua
|
||||
|
|
Loading…
Reference in New Issue