78 lines
2.2 KiB
Lua
78 lines
2.2 KiB
Lua
return {
|
|
{
|
|
"neovim/nvim-lspconfig",
|
|
init = function()
|
|
local format = function()
|
|
require("lazyvim.util").format({ force = true })
|
|
end
|
|
|
|
local keys = require("lazyvim.plugins.lsp.keymaps").get()
|
|
keys[#keys + 1] = { "<leader>lf", format, desc = "Format Document", has = "documentFormatting" }
|
|
keys[#keys + 1] = { "<leader>lf", format, desc = "Format Range", mode = "v", has = "documentRangeFormatting" }
|
|
keys[#keys + 1] = { "K", false } -- su puta madre!
|
|
vim.diagnostic.config({
|
|
float = { border = "rounded" },
|
|
})
|
|
end,
|
|
opts = {
|
|
diagnostics = {
|
|
update_in_insert = true,
|
|
},
|
|
setup = {
|
|
rust_analyzer = function()
|
|
return true
|
|
end,
|
|
tsserver = function()
|
|
return false
|
|
end,
|
|
vtsls = function()
|
|
return true
|
|
end,
|
|
},
|
|
servers = {
|
|
yamlls = {
|
|
settings = {
|
|
yaml = {
|
|
keyOrdering = false,
|
|
},
|
|
},
|
|
},
|
|
lua_ls = {
|
|
root_dir = function()
|
|
return vim.loop.cwd()
|
|
end,
|
|
-- ---@type LazyKeys[]
|
|
-- keys = {},
|
|
settings = {
|
|
Lua = {
|
|
workspace = {
|
|
checkThirdParty = false,
|
|
},
|
|
completion = {
|
|
callSnippet = "Replace",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
vtsls = { enabled = false },
|
|
tsserver = {
|
|
enabled = true,
|
|
settings = {
|
|
typescript = {
|
|
inlayHints = {
|
|
includeInlayEnumMemberValueHints = true,
|
|
includeInlayFunctionLikeReturnTypeHints = true,
|
|
includeInlayFunctionParameterTypeHints = true,
|
|
includeInlayParameterNameHints = "literals",
|
|
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
|
|
includeInlayPropertyDeclarationTypeHints = true,
|
|
includeInlayVariableTypeHints = false,
|
|
includeInlayVariableTypeHintsWhenTypeMatchesName = false,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|