Skip to content

Commit ff1dc37

Browse files
committed
Add Python LSP and formatters
1 parent b70e5cc commit ff1dc37

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

dot_config/nvim/init.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ require('lazy').setup({
590590
local servers = {
591591
-- clangd = {},
592592
-- gopls = {},
593-
-- pyright = {},
593+
pyright = {},
594594
-- rust_analyzer = {},
595595
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
596596
--
@@ -633,6 +633,8 @@ require('lazy').setup({
633633
local ensure_installed = vim.tbl_keys(servers or {})
634634
vim.list_extend(ensure_installed, {
635635
'stylua', -- Used to format Lua code
636+
'isort',
637+
'black', -- Used to format Python code
636638
})
637639
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
638640

@@ -686,7 +688,7 @@ require('lazy').setup({
686688
formatters_by_ft = {
687689
lua = { 'stylua' },
688690
-- Conform can also run multiple formatters sequentially
689-
-- python = { "isort", "black" },
691+
python = { 'isort', 'black' },
690692
--
691693
-- You can use 'stop_after_first' to run the first available formatter from the list
692694
-- javascript = { "prettierd", "prettier", stop_after_first = true },

0 commit comments

Comments
 (0)