disable svelte lsp autoformatting

This commit is contained in:
Buliway 2025-08-04 22:01:01 +03:00
parent 0c625ef877
commit 67f59ac65c
5 changed files with 21 additions and 29 deletions

View file

@ -116,7 +116,6 @@
glib glib
dbus dbus
krb5 krb5
]; ];
}; };
zsh.enable = true; zsh.enable = true;
@ -145,13 +144,6 @@
}; };
xfconf.enable = true; # For Thunar configs xfconf.enable = true; # For Thunar configs
# gdk-pixbuf-query-loaders | grep avif
# ls /run/current-system/sw/lib/gdk-pixbuf-2.0/2.10.0/loaders/
# gdk-pixbuf.modulePackages = with pkgs; [
# webp-pixbuf-loader
# libavif
# ];
steam = { steam = {
enable = true; enable = true;
# package = pkgs2.steam; # package = pkgs2.steam;
@ -169,15 +161,6 @@
# Я хз надо ли оно мне. https://github.com/ValveSoftware/gamescope # Я хз надо ли оно мне. https://github.com/ValveSoftware/gamescope
# Подробносни тут https://ventureo.codeberg.page/source/linux-gaming.html#gamescope # Подробносни тут https://ventureo.codeberg.page/source/linux-gaming.html#gamescope
gamescope.enable = true; gamescope.enable = true;
# nekoray = {
# enable = true;
# package = pkgs2.nekoray;
# tunMode = {
# enable = true;
# # setuid = true; # Рекомендуют вкл, если проблемы с выкл есть
# };
# };
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
@ -277,11 +260,11 @@
# Nushell # Nushell
pkgs2.nushell # Modern shell pkgs2.nushell # Modern shell
pkgs2.nushellPlugins.query # Nushell plugin to query JSON, XML, and various web data # pkgs2.nushellPlugins.query # Nushell plugin to query JSON, XML, and various web data
pkgs2.nushellPlugins.gstat # Git status plugin for Nushell # pkgs2.nushellPlugins.gstat # Git status plugin for Nushell
pkgs2.nushellPlugins.polars # Молниеносная аналитика данных через `dataframe ...` # pkgs2.nushellPlugins.polars # Молниеносная аналитика данных через `dataframe ...`
pkgs2.nushellPlugins.formats # Formats plugin for Nushell # pkgs2.nushellPlugins.formats # Formats plugin for Nushell
pkgs2.nushellPlugins.highlight # Syntax highlighting # pkgs2.nushellPlugins.highlight # Syntax highlighting
# For nvim # For nvim
tree-sitter # For nvim tree-sitter # For nvim

4
nvim/ftplugin/svelte.lua Normal file
View file

@ -0,0 +1,4 @@
vim.bo.expandtab = true
vim.bo.tabstop = 2
vim.bo.shiftwidth = 2
vim.bo.softtabstop = 2

4
nvim/ftplugin/yaml.lua Normal file
View file

@ -0,0 +1,4 @@
vim.bo.expandtab = true
vim.bo.tabstop = 2
vim.bo.shiftwidth = 2
vim.bo.softtabstop = 2

View file

@ -227,7 +227,11 @@ return {
end, end,
} }
lspconfig.htmx.setup {} lspconfig.htmx.setup {}
lspconfig.svelte.setup {} lspconfig.svelte.setup {
on_attach = function(client, bufnr) -- Выключить форматирование
client.server_capabilities.documentFormattingProvider = false
end,
}
lspconfig.emmet_language_server.setup { lspconfig.emmet_language_server.setup {
filetypes = { 'templ', 'css', 'eruby', 'html', 'javascript', 'javascriptreact', 'less', 'sass', 'scss', 'pug', 'typescriptreact' }, filetypes = { 'templ', 'css', 'eruby', 'html', 'javascript', 'javascriptreact', 'less', 'sass', 'scss', 'pug', 'typescriptreact' },
} }

View file

@ -26,12 +26,9 @@ vim.opt.expandtab = true
-- yaml lsp за меня решают сколько пробелов мне надо. Это фикс -- yaml lsp за меня решают сколько пробелов мне надо. Это фикс
-- Их параметры конфига для переназначения не работают. Пришлось костыль сделать -- Их параметры конфига для переназначения не работают. Пришлось костыль сделать
vim.cmd [[ -- vim.cmd [[
autocmd FileType yaml setlocal shiftwidth=2 tabstop=2 softtabstop=2 expandtab -- autocmd FileType yaml setlocal shiftwidth=2 tabstop=2 softtabstop=2 expandtab
]] -- ]]
vim.cmd [[
autocmd FileType nix setlocal shiftwidth=2 tabstop=2 softtabstop=2 expandtab
]]
-- Комментировать .proto код биндом -- Комментировать .proto код биндом
vim.api.nvim_create_autocmd('FileType', { vim.api.nvim_create_autocmd('FileType', {