corrections and improvements to have all neovim lsp and completions working

This commit is contained in:
Salar Rahmanian 2025-10-05 00:36:55 -07:00
parent f98fe01b0c
commit 7584b9ebfc
7 changed files with 130 additions and 31 deletions

View file

@ -7,6 +7,29 @@
lsp = {
inlayHints.enable = true;
servers = {
basedpyright = {
enable = true;
settings.settings.basedpyright = {
analysis = {
autoImportCompletions = true;
autoSearchPaths = true;
inlayHints = {
callArgumentNames = true;
};
diagnosticMode = "openFilesOnly";
reportMissingImports = true;
reportMissingParameterType = true;
reportUnnecessaryComparison = true;
reportUnnecessaryContains = true;
reportUnusedClass = true;
reportUnusedFunction = true;
reportUnsedImports = true;
reportUnsusedVariables = true;
typeCheckingMode = "recommended";
useLibraryCodeForTypes = true;
};
};
};
bashls.enable = true;
html.enable = true;
jqls.enable = true;
@ -19,33 +42,55 @@
metals.enable = true;
nil_ls.enable = true;
nixd.enable = true;
pyrefly.enable = true;
rust_analyzer.enable = true;
sourcekit.enable = true;
sourcekit = {
enable = true;
settings = {
cmd = [
"xcrun"
"sourcekit-lsp"
];
};
};
tinymist.enable = true;
ts_ls.enable = true;
yamlls.enable = true;
};
keymaps =
lib.mapAttrsToList
(
key: props:
{
inherit key;
options.silent = true;
}
// props
)
{
"<leader>k".action.__raw = "function() vim.diagnostic.jump({ count=-1, float=true }) end";
"<leader>j".action.__raw = "function() vim.diagnostic.jump({ count=1, float=true }) end";
gd.lspBufAction = "definition";
gD.lspBufAction = "references";
gt.lspBufAction = "type_definition";
gi.lspBufAction = "implementation";
K.lspBufAction = "hover";
"<F2>".lspBufAction = "rename";
};
keymaps = [
{
key = "<leader>k";
action.__raw = "function() vim.diagnostic.jump({ count=-1, float=true }) end";
}
{
key = "<leader>j";
action.__raw = "function() vim.diagnostic.jump({ count=1, float=true }) end";
}
{
key = "gd";
lspBufAction = "definition";
}
{
key = "gD";
lspBufAction = "references";
}
{
key = "gt";
lspBufAction = "type_definition";
}
{
key = "gi";
lspBufAction = "implementation";
}
{
key = "K";
lspBufAction = "hover";
}
{
key = "<F2>";
lspBufAction = "rename";
}
];
};
plugins = {