Initial setup, added these LSPs: gopls, templ, tailwindcss, htmx. Including in tree-sitter
This commit is contained in:
parent
8fae6798b9
commit
6a179b0c3d
4 changed files with 39 additions and 3 deletions
15
init.lua
15
init.lua
|
|
@ -102,7 +102,7 @@ vim.g.have_nerd_font = false
|
|||
vim.opt.number = true
|
||||
-- You can also add relative line numbers, for help with jumping.
|
||||
-- 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!
|
||||
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/
|
||||
local servers = {
|
||||
-- clangd = {},
|
||||
-- gopls = {},
|
||||
gopls = { filetypes = { 'templ', 'go' } },
|
||||
htmx = { filetypes = { 'htmx', 'templ' } },
|
||||
tailwindcss = { filetypes = { 'templ' } },
|
||||
templ = { filetypes = { 'templ' } },
|
||||
-- pyright = {},
|
||||
-- rust_analyzer = {},
|
||||
-- ... 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
|
||||
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
|
||||
auto_install = true,
|
||||
highlight = { enable = true },
|
||||
|
|
@ -801,6 +804,12 @@ require('lazy').setup({
|
|||
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
|
||||
-- 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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue