72 lines
1.6 KiB
Lua
72 lines
1.6 KiB
Lua
local vim = vim
|
|
|
|
-- Enable LSP servers with proper configuration
|
|
vim.lsp.enable('lua_ls')
|
|
vim.lsp.enable('gopls', {
|
|
settings = {
|
|
gopls = {
|
|
analyses = {
|
|
unusedparams = true,
|
|
unusedwrite = true,
|
|
shadow = true,
|
|
},
|
|
staticcheck = true,
|
|
usePlaceholders = true,
|
|
hints = {
|
|
assignVariableTypes = true,
|
|
compositeLiteralFields = true,
|
|
compositeLiteralTypes = true,
|
|
functionTypeParameters = true,
|
|
parameterNames = true,
|
|
rangeVariableTypes = true,
|
|
},
|
|
},
|
|
},
|
|
})
|
|
vim.lsp.enable('nim_langserver')
|
|
|
|
-- Fix: Add proper configuration for pyright/basedpyright
|
|
-- For NixOS with basedpyright:
|
|
vim.lsp.enable('basedpyright', {
|
|
settings = {
|
|
basedpyright = {
|
|
analysis = {
|
|
typeCheckingMode = "basic",
|
|
autoSearchPaths = true,
|
|
useLibraryCodeForTypes = true,
|
|
diagnosticMode = "workspace",
|
|
},
|
|
}
|
|
}
|
|
})
|
|
|
|
|
|
require("lsp_signature").setup({
|
|
debug = false,
|
|
bind = true,
|
|
doc_lines = 5,
|
|
max_height = 8,
|
|
max_width = function() return math.floor(vim.api.nvim_win_get_width(0) * 0.7) end,
|
|
wrap = true,
|
|
floating_window = true,
|
|
floating_window_above_cur_line = false,
|
|
floating_window_off_x = 1,
|
|
floating_window_off_y = 1,
|
|
-- hint_enable = true,
|
|
hint_enable = false,
|
|
hint_inline = function() return false end,
|
|
-- hint_prefix = "🐼 ",
|
|
hint_prefix = "",
|
|
hint_scheme = "String",
|
|
hi_parameter = "LspSignatureActiveParameter",
|
|
handler_opts = { border = "rounded" },
|
|
always_trigger = false,
|
|
auto_close_after = 5,
|
|
extra_trigger_chars = { "(", "," },
|
|
-- zindex = 200,
|
|
zindex = 50,
|
|
padding = "",
|
|
timer_interval = 200,
|
|
})
|
|
|