diff --git a/init.lua b/init.lua index 64288fc..2fa507d 100644 --- a/init.lua +++ b/init.lua @@ -1,9 +1,8 @@ -vim.g.mapleader = "," - local github = function(repo) return "https://github.com/" .. repo end +vim.g.mapleader = "," vim.opt.winborder = "rounded" vim.opt.relativenumber = true vim.opt.number = true @@ -30,10 +29,12 @@ vim.opt.filetype = "on" vim.o.swapfile = false vim.o.wrap = false vim.o.clipboard = "unnamedplus" +vim.opt.cmdheight = 1 +vim.opt.laststatus = 3 -- Persistent undos vim.opt.undofile = true -vim.filetype.add({ extension = { mdx = "mdx", service = "systemd", templ = "templ" } }) +vim.filetype.add({ extension = { service = "systemd", templ = "templ" } }) vim.opt.packpath:prepend(vim.fn.stdpath("data") .. "/site") vim.pack.add({ @@ -128,8 +129,6 @@ require("crates").setup({ }) require("nvim-lastplace").setup() require("which-key").setup() -vim.opt.cmdheight = 1 -vim.opt.laststatus = 3 require("lualine").setup({ options = { component_separators = { left = "|", right = "|" }, @@ -160,6 +159,9 @@ if cwd:sub(1, #conform_folder) ~= conform_folder then end require("mappings") +require("lsp") +vim.cmd("set completeopt+=noselect") +vim.lsp.enable({ "lua_ls", "gh_actions_ls", "gopls", "astro" }) vim.api.nvim_create_autocmd("LspAttach", { callback = function(ev) local client = vim.lsp.get_client_by_id(ev.data.client_id) @@ -169,13 +171,6 @@ vim.api.nvim_create_autocmd("LspAttach", { end, }) -require("lsp") -vim.cmd("set completeopt+=noselect") -vim.lsp.enable({ "lua_ls", "gh_actions_ls", "gopls" }) - -vim.treesitter.language.register("markdown", "mdx") -vim.treesitter.language.register("html", "superhtml") - require("treesitter-context").setup() vim.api.nvim_create_autocmd({ "FileType" }, { diff --git a/lua/lsp.lua b/lua/lsp.lua index c0a6a5f..a0b8fca 100644 --- a/lua/lsp.lua +++ b/lua/lsp.lua @@ -12,10 +12,6 @@ local servers = { "terraformls", exec = "terraform-ls", }, - { - "eslint", - exec = "vscode-eslint-language-server", - }, { "nil_ls", exec = "nil", @@ -28,7 +24,6 @@ local servers = { "astro", exec = "astro-ls", }, - "gopls", { "yamlls", exec = "yaml-language-server", diff --git a/queries/superhtml/highlights.scm b/queries/superhtml/highlights.scm deleted file mode 100644 index 3f41218..0000000 --- a/queries/superhtml/highlights.scm +++ /dev/null @@ -1,68 +0,0 @@ -(erroneous_end_tag_name) @tag.error -(doctype) @constant -(comment) @comment - -((tag_name) @special - (#any-of? @special "super" "extend")) -(tag_name) @tag - -; ( -; (element -; (start_tag -; (tag_name) @special)) -; (element -; (start_tag -; (attribute -; (attribute_name) @attribute -; [ -; (attribute_value) @markup.link.url -; (quoted_attribute_value (attribute_value) @markup.link.url) -; ]))) -; (#eq? @special "extend") -; (#eq? @attribute "id") -; ) - - -( - (element - (start_tag - (attribute - (attribute_name) @attribute - [ - (attribute_value) @markup.link.url - (quoted_attribute_value (attribute_value) @markup.link.url) - ])) - (element - (start_tag - (tag_name) @tag))) - (#eq? @tag "super") - (#eq? @attribute "id") -) - -( - (element - (start_tag - (tag_name) @special - (attribute - (attribute_name) @error)+)) - (#eq? @special "super") -) - -; ((attribute_name) @keyword.control.conditional -; (#match? @keyword.control.conditional "^[$]")) -(attribute_name) @attribute - -[ - "\"" - (attribute_value) -] @string - -[ - "<" - ">" - "" - "