nvim/pack/acp/start/nvim-lspconfig/lua/lspconfig/server_configurations/templ.lua

22 lines
467 B
Lua
Raw Normal View History

2024-04-06 13:39:53 +00:00
local util = require 'lspconfig.util'
return {
default_config = {
cmd = { 'templ', 'lsp' },
filetypes = { 'templ' },
root_dir = function(fname)
return util.root_pattern('go.work', 'go.mod', '.git')(fname)
end,
},
docs = {
description = [[
https://templ.guide
The official language server for the templ HTML templating language.
]],
default_config = {
root_dir = [[root_pattern('go.work', 'go.mod', '.git')]],
},
},
}