got lsps up and running.
This commit is contained in:
parent
25b2b07a46
commit
cef27f07ce
|
@ -96,11 +96,11 @@
|
|||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701680307,
|
||||
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -118,11 +118,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1703887061,
|
||||
"narHash": "sha256-gGPa9qWNc6eCXT/+Z5/zMkyYOuRZqeFZBDbopNZQkuY=",
|
||||
"lastModified": 1709087332,
|
||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "43e1aa1308018f37118e34d3a9cb4f5e75dc11d5",
|
||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -138,11 +138,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710714957,
|
||||
"narHash": "sha256-eZCxuF58YWgaJMMRrn8oRkwRhxooe5kBS/s2wRVr9PA=",
|
||||
"lastModified": 1710820906,
|
||||
"narHash": "sha256-2bNMraoRB4pdw/HtxgYTFeMhEekBZeQ53/a8xkqpbZc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "7b3fca5adcf6c709874a8f2e0c364fe9c58db989",
|
||||
"rev": "022464438a85450abb23d93b91aa82e0addd71fb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -159,11 +159,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710714957,
|
||||
"narHash": "sha256-eZCxuF58YWgaJMMRrn8oRkwRhxooe5kBS/s2wRVr9PA=",
|
||||
"lastModified": 1710820906,
|
||||
"narHash": "sha256-2bNMraoRB4pdw/HtxgYTFeMhEekBZeQ53/a8xkqpbZc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "7b3fca5adcf6c709874a8f2e0c364fe9c58db989",
|
||||
"rev": "022464438a85450abb23d93b91aa82e0addd71fb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -195,11 +195,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1710631334,
|
||||
"narHash": "sha256-rL5LSYd85kplL5othxK5lmAtjyMOBg390sGBTb3LRMM=",
|
||||
"lastModified": 1710806803,
|
||||
"narHash": "sha256-qrxvLS888pNJFwJdK+hf1wpRCSQcqA6W5+Ox202NDa0=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c75037bbf9093a2acb617804ee46320d6d1fea5a",
|
||||
"rev": "b06025f1533a1e07b6db3e75151caa155d1c7eb3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -222,11 +222,11 @@
|
|||
"pre-commit-hooks": "pre-commit-hooks"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710856562,
|
||||
"narHash": "sha256-JM24d2f60/9q7D7nzyhGm0gcH+HQsrY8Q0rGOFcJzeQ=",
|
||||
"lastModified": 1710936779,
|
||||
"narHash": "sha256-ecYnUzSWqRae10pp7J6ZE2BznTPJ9f8sLiIoDBQtRBw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "0a5e0c68b829f9fec135f479e3ec34332660f93d",
|
||||
"rev": "4f6e90212c7ec56d7c03611fb86befa313e7f61f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -250,11 +250,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1708018599,
|
||||
"narHash": "sha256-M+Ng6+SePmA8g06CmUZWi1AjG2tFBX9WCXElBHEKnyM=",
|
||||
"lastModified": 1710843117,
|
||||
"narHash": "sha256-b6iKQeHegzpc697rxTPA3bpwGN3m50eLCgdQOmceFuE=",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "5df5a70ad7575f6601d91f0efec95dd9bc619431",
|
||||
"rev": "e8dc1b4fe80c6fcededde7700e6a23bcdf7f3347",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
}: {
|
||||
programs.nixvim = {
|
||||
plugins.luasnip.enable = true;
|
||||
plugins.friendly-snippets.enable=true;
|
||||
plugins.friendly-snippets.enable = true;
|
||||
plugins.cmp = {
|
||||
enable = true;
|
||||
autoEnableSources = true;
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
plugins.gitsigns = {
|
||||
enable = true;
|
||||
};
|
||||
plugins.which-key.registrations = {
|
||||
"<leader>g" = "+git";
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
action = ":Gitsigns toggle_current_line_blame<CR>";
|
||||
|
|
|
@ -7,7 +7,9 @@
|
|||
globals = {
|
||||
mapleader = ";";
|
||||
};
|
||||
|
||||
plugins.which-key.registrations = {
|
||||
"<leader>c" = "+check";
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
action = ":setlocal spell!<CR>";
|
||||
|
|
|
@ -4,8 +4,191 @@
|
|||
...
|
||||
}: {
|
||||
programs.nixvim = {
|
||||
plugins.lsp={
|
||||
enable=true;
|
||||
servers={
|
||||
bashls.enable=true;
|
||||
clangd.enable=true;
|
||||
lua-ls.enable=true;
|
||||
nil_ls.enable=true;
|
||||
nushell.enable=true;
|
||||
pyright.enable=true;
|
||||
ruff-lsp.enable=true;
|
||||
rust-analyzer={
|
||||
enable=true;
|
||||
installCargo=true;
|
||||
installRustc=true;
|
||||
};
|
||||
texlab.enable=true;
|
||||
typst-lsp.enable=true;
|
||||
taplo.enable=true;
|
||||
yamlls.enable=true;
|
||||
marksman.enable=true;
|
||||
jsonls.enable=true;
|
||||
hls.enable=true;
|
||||
};
|
||||
};
|
||||
plugins.cmp.settings.sources=[
|
||||
{name="nvim_lsp";}
|
||||
];
|
||||
plugins.which-key.registrations = {
|
||||
"<leader>l" = "+lsp";
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
action = "vim.lsp.buf.declaration";
|
||||
key = "<leader>lc";
|
||||
lua = true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "declaration";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "vim.lsp.buf.definition";
|
||||
key = "<leader>ld";
|
||||
lua = true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "definition";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "vim.lsp.buf.hover";
|
||||
key = "<leader>lh";
|
||||
lua = true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "hover";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "vim.lsp.buf.implementation";
|
||||
key = "<leader>li";
|
||||
lua = true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "implementation";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "vim.lsp.buf.signature_help";
|
||||
key = "<leader>ls";
|
||||
lua = true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "signature_help";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "vim.lsp.buf.add_workspace_folder";
|
||||
key = "<leader>lwa";
|
||||
lua = true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "add folder";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "vim.lsp.buf.remove_workspace_folder";
|
||||
key = "<leader>lwr";
|
||||
lua = true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "remove folder";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "vim.lsp.buf.list_workspace_folders";
|
||||
key = "<leader>lw";
|
||||
lua = true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "workspace";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "vim.lsp.buf.rename";
|
||||
key = "<leader>lr";
|
||||
lua = true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "rename";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "vim.lsp.buf.code_action";
|
||||
key = "<leader>la";
|
||||
lua = true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "code action";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "vim.lsp.buf.references";
|
||||
key = "<leader>le";
|
||||
lua = true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "list references";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "function() vim.lsp.buf.format{async=true} end";
|
||||
key = "<leader>lm";
|
||||
lua = true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "format buffer";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "vim.diagnostic.open_float";
|
||||
key = "<leader>lo";
|
||||
lua = true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "open float";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "vim.diagnostic.goto_next";
|
||||
key = "]d";
|
||||
lua = true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "next diagnostic";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "vim.diagnostic.goto_prev";
|
||||
key = "[d";
|
||||
lua = true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "prev diagnostic";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
imports = [
|
||||
# ./outline.nix
|
||||
./outline.nix
|
||||
./rust-tools.nix
|
||||
];
|
||||
}
|
||||
|
|
11
nix/nvim/lsp/rust-tools.nix
Normal file
11
nix/nvim/lsp/rust-tools.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
configs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.nixvim = {
|
||||
plugins.rust-tools = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue