Skip to content

Commit 7fc6a70

Browse files
committed
Enable LSP and formatters for TypeScript et al.
1 parent 5492e64 commit 7fc6a70

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

dot_config/nvim/init.lua

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ require('lazy').setup({
598598
-- https://github.com/pmizio/typescript-tools.nvim
599599
--
600600
-- But for many setups, the LSP (`ts_ls`) will work just fine
601-
-- ts_ls = {},
601+
ts_ls = {},
602602
--
603603

604604
lua_ls = {
@@ -635,6 +635,7 @@ require('lazy').setup({
635635
'stylua', -- Used to format Lua code
636636
'isort',
637637
'black', -- Used to format Python code
638+
'prettierd',
638639
})
639640
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
640641

@@ -691,7 +692,13 @@ require('lazy').setup({
691692
python = { 'isort', 'black' },
692693
--
693694
-- You can use 'stop_after_first' to run the first available formatter from the list
694-
-- javascript = { "prettierd", "prettier", stop_after_first = true },
695+
javascript = { 'prettierd', 'prettier', stop_after_first = true },
696+
typescript = { 'prettierd', 'prettier', stop_after_first = true },
697+
typescriptreact = { 'prettierd', 'prettier', stop_after_first = true },
698+
json = { 'prettierd', 'prettier', stop_after_first = true },
699+
jsonc = { 'prettierd', 'prettier', stop_after_first = true },
700+
html = { 'prettierd', 'prettier', stop_after_first = true },
701+
css = { 'prettierd', 'prettier', stop_after_first = true },
695702
},
696703
},
697704
},

0 commit comments

Comments
 (0)