feat: improve vim setup

This commit is contained in:
2024-04-05 13:39:06 +02:00
parent fb007b3cf1
commit dba82266d4
7 changed files with 107 additions and 11 deletions

View File

@@ -254,17 +254,12 @@ in
'';
};
lint = {
none-ls = {
enable = true;
lintersByFt = {
javascript = [ "eslint" ];
typescript = [ "eslint" ];
css = [ "stylelint" ];
scss = [ "stylelint" ];
less = [ "stylelint" ];
bash = [ "shellcheck" ];
sources = {
diagnostics.stylelint.enable = true;
formatting.stylelint.enable = true;
};
autoCmd.event = "TextChanged";
};
lsp = {
@@ -323,6 +318,9 @@ in
cssls.enable = true;
svelte.enable = true;
tsserver.enable = true;
eslint.enable = true;
dockerls.enable = true;
yamlls.enable = true;
jsonls.enable = true;
@@ -419,6 +417,7 @@ in
h = "Diagnostics";
a = "Code Actions";
f = "Auto Formatting";
x = "LSP Format";
};
"<leader>x" = {
name = "Trouble";

View File

@@ -71,6 +71,13 @@
options.silent = true;
action = "<cmd>:ConformToggle<CR>";
}
{
key = "<leader>sx";
mode = "n";
options.silent = true;
lua = true;
action = "vim.lsp.buf.format";
}
# Trouble
{
key = "<leader>xx";