diff --git a/home/editor/neovim/plugins.lua b/home/editor/neovim/plugins.lua index 6a805d8..d2e7477 100644 --- a/home/editor/neovim/plugins.lua +++ b/home/editor/neovim/plugins.lua @@ -33,6 +33,8 @@ lspconfig.gopls.setup({ } } }) + +-- GO: Automatically organize imports on save vim.api.nvim_create_autocmd("BufWritePre", { pattern = "*.go", callback = function() @@ -131,6 +133,15 @@ lspconfig.rust_analyzer.setup { lspconfig.ruff.setup({ }) +-- Ruff: automatically format on save +vim.api.nvim_create_autocmd("BufWritePre", { + pattern = "*.py", + callback = function() + vim.lsp.buf.format { async = false } + end, +}) + +-- Ruff: Disable hover capability vim.api.nvim_create_autocmd("LspAttach", { group = vim.api.nvim_create_augroup('lsp_attach_disable_ruff_hover', { clear = true }), callback = function(args)