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
window-is-ready-remover
random-wallpaper
workspaces-indicator-by-open-apps
vitals
tailscale-status
runcat
]);
gnome.excludePackages = (with pkgs; [

View file

@ -300,10 +300,22 @@
disable-extension-version-validation = true;
enabled-extensions = [
"workspace-indicator@gnome-shell-extensions.gcampax.github.com"
"workspaces-by-open-apps@favo02.github.com"
"pop-shell@system76.com"
"windowIsReady_Remover@nunofarruca@gmail.com"
"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
on_attach = function(current_client, bufnr)
if current_client.supports_method("textDocument/formatting") then
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
vim.api.nvim_create_autocmd("BufWritePre", {
group = augroup,
buffer = bufnr,
callback = function()
vim.lsp.buf.format({
filter = function(client)
-- only use null-ls for formatting instead of lsp server
return client.name == "null-ls"
end,
bufnr = bufnr,
})
end,
})
end
end,
-- on_attach = function(current_client, bufnr)
-- if current_client.supports_method("textDocument/formatting") then
-- vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
-- vim.api.nvim_create_autocmd("BufWritePre", {
-- group = augroup,
-- buffer = bufnr,
-- callback = function()
-- vim.lsp.buf.format({
-- filter = function(client)
-- -- only use null-ls for formatting instead of lsp server
-- return client.name == "null-ls"
-- end,
-- bufnr = bufnr,
-- })
-- end,
-- })
-- end
-- end,
})
-- formatting command