summaryrefslogtreecommitdiff
path: root/after/plugin/lsp.lua
diff options
context:
space:
mode:
authortalha <talha@talhaamir.xyz>2023-12-14 11:49:47 +0500
committertalha <talha@talhaamir.xyz>2023-12-14 11:49:47 +0500
commitdb929434fa2f29e5674a5f24d71901b4fa458363 (patch)
tree850a02a7c945a1a25040ae289a62385e6d0f47f8 /after/plugin/lsp.lua
parent27c1b5b9a5cadf1d1331e4cefeaa9c8a73707b26 (diff)
Fix autoreload, added autocmd:
- Added autoreload to fix reloading when file changed externally - Added autocmd to format python files on save
Diffstat (limited to 'after/plugin/lsp.lua')
-rw-r--r--after/plugin/lsp.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/after/plugin/lsp.lua b/after/plugin/lsp.lua
index f8dae3c..642328c 100644
--- a/after/plugin/lsp.lua
+++ b/after/plugin/lsp.lua
@@ -20,6 +20,7 @@ lsp.on_attach(function(client, bufnr)
vim.keymap.set("n", "<leader>vrr", function() vim.lsp.buf.references() end, opts)
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts)
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
+ lsp.buffer_autoformat()
end)
lsp.setup()