nixvim!
This commit is contained in:
parent
1ae2d7cc6a
commit
6198767e5b
47 changed files with 2430 additions and 108 deletions
50
modules/editors/nixvim/plug/lsp/none-ls.nix
Normal file
50
modules/editors/nixvim/plug/lsp/none-ls.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
plugins.none-ls = {
|
||||
enable = true;
|
||||
enableLspFormat = true;
|
||||
updateInInsert = false;
|
||||
sources = {
|
||||
code_actions = {
|
||||
gitsigns.enable = true;
|
||||
statix.enable = true;
|
||||
};
|
||||
diagnostics = {
|
||||
statix.enable = true;
|
||||
yamllint.enable = true;
|
||||
};
|
||||
formatting = {
|
||||
alejandra.enable = true;
|
||||
black = {
|
||||
enable = true;
|
||||
withArgs = ''
|
||||
{
|
||||
extra_args = { "--fast" },
|
||||
}
|
||||
'';
|
||||
};
|
||||
prettier = {
|
||||
enable = true;
|
||||
disableTsServerFormatter = true;
|
||||
withArgs = ''
|
||||
{
|
||||
extra_args = { "--no-semi", "--single-quote" },
|
||||
}
|
||||
'';
|
||||
};
|
||||
stylua.enable = true;
|
||||
yamlfmt.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = ["n" "v"];
|
||||
key = "<leader>cf";
|
||||
action = "<cmd>lua vim.lsp.buf.format()<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Format";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue