Initial setup, added these LSPs: gopls, templ, tailwindcss, htmx. Including in tree-sitter
This commit is contained in:
parent
8fae6798b9
commit
6a179b0c3d
|
@ -2,6 +2,7 @@ tags
|
||||||
test.sh
|
test.sh
|
||||||
.luarc.json
|
.luarc.json
|
||||||
nvim
|
nvim
|
||||||
|
node_modules/
|
||||||
|
|
||||||
spell/
|
spell/
|
||||||
lazy-lock.json
|
lazy-lock.json
|
||||||
|
|
15
init.lua
15
init.lua
|
@ -102,7 +102,7 @@ vim.g.have_nerd_font = false
|
||||||
vim.opt.number = true
|
vim.opt.number = true
|
||||||
-- You can also add relative line numbers, for help with jumping.
|
-- You can also add relative line numbers, for help with jumping.
|
||||||
-- Experiment for yourself to see if you like it!
|
-- Experiment for yourself to see if you like it!
|
||||||
-- vim.opt.relativenumber = true
|
vim.opt.relativenumber = true
|
||||||
|
|
||||||
-- Enable mouse mode, can be useful for resizing splits for example!
|
-- Enable mouse mode, can be useful for resizing splits for example!
|
||||||
vim.opt.mouse = 'a'
|
vim.opt.mouse = 'a'
|
||||||
|
@ -533,7 +533,10 @@ require('lazy').setup({
|
||||||
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
||||||
local servers = {
|
local servers = {
|
||||||
-- clangd = {},
|
-- clangd = {},
|
||||||
-- gopls = {},
|
gopls = { filetypes = { 'templ', 'go' } },
|
||||||
|
htmx = { filetypes = { 'htmx', 'templ' } },
|
||||||
|
tailwindcss = { filetypes = { 'templ' } },
|
||||||
|
templ = { filetypes = { 'templ' } },
|
||||||
-- pyright = {},
|
-- pyright = {},
|
||||||
-- rust_analyzer = {},
|
-- rust_analyzer = {},
|
||||||
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||||
|
@ -785,7 +788,7 @@ require('lazy').setup({
|
||||||
|
|
||||||
---@diagnostic disable-next-line: missing-fields
|
---@diagnostic disable-next-line: missing-fields
|
||||||
require('nvim-treesitter.configs').setup {
|
require('nvim-treesitter.configs').setup {
|
||||||
ensure_installed = { 'bash', 'c', 'html', 'lua', 'markdown', 'vim', 'vimdoc' },
|
ensure_installed = { 'bash', 'c', 'html', 'lua', 'markdown', 'vim', 'vimdoc', 'go', 'templ' },
|
||||||
-- Autoinstall languages that are not installed
|
-- Autoinstall languages that are not installed
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
highlight = { enable = true },
|
highlight = { enable = true },
|
||||||
|
@ -801,6 +804,12 @@ require('lazy').setup({
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
vim.filetype.add {
|
||||||
|
extension = {
|
||||||
|
templ = 'templ',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
-- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the
|
-- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the
|
||||||
-- init.lua. If you want these files, they are in the repository, so you can just download them and
|
-- init.lua. If you want these files, they are in the repository, so you can just download them and
|
||||||
-- put them in the right spots if you want.
|
-- put them in the right spots if you want.
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"name": "nvim",
|
||||||
|
"lockfileVersion": 3,
|
||||||
|
"requires": true,
|
||||||
|
"packages": {
|
||||||
|
"": {
|
||||||
|
"dependencies": {
|
||||||
|
"tree-sitter-cli": "^0.21.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/tree-sitter-cli": {
|
||||||
|
"version": "0.21.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/tree-sitter-cli/-/tree-sitter-cli-0.21.0.tgz",
|
||||||
|
"integrity": "sha512-wA7wT5724fNQW82XDH6zT6ZcYonjrAKLCHHuhLsPcAKULrhp3rNuMvlgBdB5FUBvmjHNhtTZF/qpHenMoRJPBw==",
|
||||||
|
"hasInstallScript": true,
|
||||||
|
"bin": {
|
||||||
|
"tree-sitter": "cli.js"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"dependencies": {
|
||||||
|
"tree-sitter-cli": "^0.21.0"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue