Install some Gnome extensions

Disable neovim auto formatting
This commit is contained in:
Pim Kunis 2024-10-11 00:46:14 +02:00
parent cd66409759
commit a7e1fcd0d9
3 changed files with 35 additions and 19 deletions

View file

@ -82,6 +82,10 @@
pop-shell pop-shell
window-is-ready-remover window-is-ready-remover
random-wallpaper random-wallpaper
workspaces-indicator-by-open-apps
vitals
tailscale-status
runcat
]); ]);
gnome.excludePackages = (with pkgs; [ gnome.excludePackages = (with pkgs; [

View file

@ -300,10 +300,22 @@
disable-extension-version-validation = true; disable-extension-version-validation = true;
enabled-extensions = [ enabled-extensions = [
"workspace-indicator@gnome-shell-extensions.gcampax.github.com" "workspaces-by-open-apps@favo02.github.com"
"pop-shell@system76.com" "pop-shell@system76.com"
"windowIsReady_Remover@nunofarruca@gmail.com" "windowIsReady_Remover@nunofarruca@gmail.com"
"randomwallpaper@iflow.space" "randomwallpaper@iflow.space"
"Vitals@CoreCoding.com"
"tailscale-status@maxgallup.github.com"
"runcat@kolesnikov.se"
];
};
"org/gnome/shell/extensions/vitals" = {
icon-style = 1;
hot-sensors = [
"_memory_usage_"
"_storage_free_"
]; ];
}; };

View file

@ -20,24 +20,24 @@ require("null-ls").setup({
}, },
-- configure format on save -- configure format on save
on_attach = function(current_client, bufnr) -- on_attach = function(current_client, bufnr)
if current_client.supports_method("textDocument/formatting") then -- if current_client.supports_method("textDocument/formatting") then
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr }) -- vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
vim.api.nvim_create_autocmd("BufWritePre", { -- vim.api.nvim_create_autocmd("BufWritePre", {
group = augroup, -- group = augroup,
buffer = bufnr, -- buffer = bufnr,
callback = function() -- callback = function()
vim.lsp.buf.format({ -- vim.lsp.buf.format({
filter = function(client) -- filter = function(client)
-- only use null-ls for formatting instead of lsp server -- -- only use null-ls for formatting instead of lsp server
return client.name == "null-ls" -- return client.name == "null-ls"
end, -- end,
bufnr = bufnr, -- bufnr = bufnr,
}) -- })
end, -- end,
}) -- })
end -- end
end, -- end,
}) })
-- formatting command -- formatting command