362b9f0c7656424d541811cd0bae69ce10e54e67

Author
TheEdgeOfRage <git@theedgeofrage.com>
Committer
TheEdgeOfRage <git@theedgeofrage.com>
Date

Message

Add support for templ to neovim

Diff

 1diff --git a/dot_config/nvim/lua/mappings.lua b/dot_config/nvim/lua/mappings.lua
 2index 37c806eb1d0153e41c97a660f85bc3d5fd039fff..f978ca972ddeb2ae31d47b3ec5270f8ccb59f7bf 100644
 3--- a/dot_config/nvim/lua/mappings.lua
 4+++ b/dot_config/nvim/lua/mappings.lua
 5@@ -47,7 +47,11 @@ vim.keymap.set("n", "<leader>wq", vim.cmd.wq, opts)
 6 vim.keymap.set("n", "<leader>bd", ":bp | bd #<cr>", opts)
 7 vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle, opts)
 8 vim.keymap.set("", "\\", ':let @/ = ""<CR>', opts)
 9-require("Comment.ft").set("resolv", "#%s")
10+
11+-- Comment strings
12+local comment = require("Comment.ft")
13+comment.resolv = "#%s"
14+comment.templ = "//%s"
15 
16 -- Git
17 vim.keymap.set("n", "<leader>gd", vim.cmd.Gvdiff, opts)
18diff --git a/dot_config/nvim/lua/plugins/lsp.lua b/dot_config/nvim/lua/plugins/lsp.lua
19index 316d03c79615628d5526b8e68a7a6f8dd7f2660f..ec61bd5c162ee269ea4522c8809e9f71f44641ce 100644
20--- a/dot_config/nvim/lua/plugins/lsp.lua
21+++ b/dot_config/nvim/lua/plugins/lsp.lua
22@@ -52,6 +52,7 @@ return {
23 						},
24 					},
25 				},
26+				templ = {},
27 				rust_analyzer = {
28 					settings = {
29 						["rust-analyzer"] = {
30@@ -192,6 +193,7 @@ return {
31 					typescript = { "efm" },
32 					svelte = { "prettierd" },
33 					go = { "golines", "golangci-lint" },
34+					templ = { "templ" },
35 					html = { "htmlbeautifier", "htmlhint" },
36 					tmpl = { "htmlbeautifier", "htmlhint" },
37 					yaml = {},