adding in templ golang configuration
This commit is contained in:
@@ -554,6 +554,8 @@ require('lazy').setup({
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities())
|
||||
|
||||
vim.filetype.add({ extension = { templ = "templ" } })
|
||||
|
||||
-- Enable the following language servers
|
||||
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
|
||||
--
|
||||
@@ -578,7 +580,29 @@ require('lazy').setup({
|
||||
},
|
||||
filetypes = { 'c', 'cpp', 'objc', 'objcpp', 'hpp', 'h', 'cc' },
|
||||
},
|
||||
gopls = {},
|
||||
-- gopls = {},
|
||||
templ = {
|
||||
cmd = { 'templ', 'lsp' },
|
||||
filetypes = { 'templ' },
|
||||
-- root_dir = require('lspconfig').util.root_pattern('go.mod', 'go.sum'),
|
||||
},
|
||||
html = {
|
||||
filetypes = { 'html', 'templ' },
|
||||
},
|
||||
htmx = {
|
||||
filetypes = { 'htmx', 'templ' },
|
||||
},
|
||||
tailwindcss = {
|
||||
filetypes = { "templ", "astro", "javascript", "typescript", "react" },
|
||||
settings = {
|
||||
tailwindCSS = {
|
||||
includeLanguages = {
|
||||
templ = "html",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- pyright = {},
|
||||
-- rust_analyzer = {},
|
||||
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||
@@ -839,8 +863,11 @@ require('lazy').setup({
|
||||
{ -- Highlight, edit, and navigate code
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
build = ':TSUpdate',
|
||||
dependencies = {
|
||||
'vrischmann/tree-sitter-templ',
|
||||
},
|
||||
opts = {
|
||||
ensure_installed = { 'bash', 'c', 'html', 'lua', 'markdown', 'vim', 'vimdoc' },
|
||||
ensure_installed = { 'bash', 'c', 'html', 'lua', 'markdown', 'vim', 'vimdoc', 'templ' },
|
||||
-- Autoinstall languages that are not installed
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
|
||||
@@ -97,14 +97,4 @@ return {
|
||||
end, {})
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
'MeanderingProgrammer/markdown.nvim',
|
||||
main = "render-markdown",
|
||||
opts = {},
|
||||
name = 'render-markdown', -- Only needed if you have another plugin named markdown.nvim
|
||||
dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite
|
||||
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.icons' }, -- if you use standalone mini plugins
|
||||
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user