nvim: add javascript syntax highlighting, lsp, and formatting
This commit is contained in:
parent
81b214586f
commit
93571017f7
2 changed files with 5 additions and 1 deletions
|
@ -37,7 +37,7 @@ local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||||
local lspconfig = require('lspconfig')
|
local lspconfig = require('lspconfig')
|
||||||
|
|
||||||
-- Enable some language servers with the additional completion capabilities offered by nvim-cmp
|
-- Enable some language servers with the additional completion capabilities offered by nvim-cmp
|
||||||
local servers = { 'clangd', 'rust_analyzer', 'ts_ls', 'typst_lsp', 'vhdl_ls' }
|
local servers = { 'clangd', 'rust_analyzer', 'typst_lsp', 'vhdl_ls', 'vtsls' }
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
lspconfig[lsp].setup {
|
lspconfig[lsp].setup {
|
||||||
-- on_attach = my_custom_on_attach,
|
-- on_attach = my_custom_on_attach,
|
||||||
|
@ -108,6 +108,7 @@ require("conform").setup({
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
css = { "prettier", },
|
css = { "prettier", },
|
||||||
html = { "prettier", },
|
html = { "prettier", },
|
||||||
|
javascript = { "prettier", },
|
||||||
python = { "black" },
|
python = { "black" },
|
||||||
},
|
},
|
||||||
format_on_save = {
|
format_on_save = {
|
||||||
|
|
|
@ -81,6 +81,7 @@ in
|
||||||
"typst-lsp"
|
"typst-lsp"
|
||||||
"unzip"
|
"unzip"
|
||||||
"vhdl-ls"
|
"vhdl-ls"
|
||||||
|
"vtsls"
|
||||||
"wget"
|
"wget"
|
||||||
"zip"
|
"zip"
|
||||||
"zoxide"
|
"zoxide"
|
||||||
|
@ -116,6 +117,8 @@ in
|
||||||
nvim-lspconfig
|
nvim-lspconfig
|
||||||
(nvim-treesitter.withPlugins (
|
(nvim-treesitter.withPlugins (
|
||||||
plugins: with plugins; [
|
plugins: with plugins; [
|
||||||
|
glsl
|
||||||
|
javascript
|
||||||
markdown
|
markdown
|
||||||
]
|
]
|
||||||
))
|
))
|
||||||
|
|
Loading…
Reference in a new issue