(nvim) fix issues with ts-autotag

This commit is contained in:
juancwu 2026-05-30 01:20:23 +00:00
commit 51824ef86b
4 changed files with 48 additions and 1 deletions

15
nvim/lsp/postgres_lsp.lua Normal file
View file

@ -0,0 +1,15 @@
---@brief
---
--- https://pg-language-server.com
---
--- A collection of language tools and a Language Server Protocol (LSP) implementation for Postgres, focusing on developer experience and reliable SQL tooling.
---@type vim.lsp.Config
return {
cmd = { "postgres-language-server", "lsp-proxy" },
filetypes = {
"sql",
},
root_markers = { "postgres-language-server.jsonc" },
workspace_required = true,
}

View file

@ -214,6 +214,29 @@ vim.pack.add({
require("mini.pairs").setup()
-- auto closing tags
vim.pack.add({
{
src = "https://github.com/windwp/nvim-ts-autotag",
version = "8e1c0a389f20bf7f5b0dd0e00306c1247bda2595",
},
})
require("nvim-ts-autotag").setup({
filetypes = {
"html",
"javascript",
"typescript",
"javascriptreact",
"typescriptreact",
"svelte",
"vue",
"xml",
"php",
"templ",
},
})
-- telescope
vim.pack.add({
{

View file

@ -21,6 +21,14 @@ local ensured_installed = {
"typescript",
"lua",
"templ",
-- parsers for nvim-ts-autotag filetypes; without these
-- vim.treesitter.get_parser() returns nil on nvim 0.12 and
-- autotag crashes on InsertLeave
"html",
"tsx",
"svelte",
"vue",
"xml",
}
local already_installed = treesitter.get_installed()
local parsers_to_install = vim.iter(ensured_installed)

View file

@ -101,7 +101,8 @@
},
"nvim-ts-autotag": {
"rev": "8e1c0a389f20bf7f5b0dd0e00306c1247bda2595",
"src": "https://github.com/windwp/nvim-ts-autotag"
"src": "https://github.com/windwp/nvim-ts-autotag",
"version": "'8e1c0a389f20bf7f5b0dd0e00306c1247bda2595'"
},
"nvim-ts-context-commentstring": {
"rev": "6141a40173c6efa98242dc951ed4b6f892c97027",