diff --git a/lua/filetypes.lua b/lua/filetypes.lua index 0935b18..7c232a4 100644 --- a/lua/filetypes.lua +++ b/lua/filetypes.lua @@ -11,5 +11,6 @@ vim.filetype.add({ return "typst" end, idr = "idris2", + wgsl = "wgsl", }, }) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 6ceff04..e6de0d1 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -1,17 +1,3 @@ ---- Automatically set the filetype for all buffers matching a pattern. ---- Uses an autocommand under the hood ---- @param pattern string|string[] What buffers to match on. ---- @see vim.api.nvim_create_autocmd ---- @param filetype string The filetype to set for the matching buffers -local function bind_filetype(pattern, filetype) - vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, { - pattern = pattern, - callback = function() - vim.bo.filetype = filetype - end, - }) -end - return { { import = "plugins/languages" }, { @@ -71,8 +57,6 @@ return { local capabilities = require("cmp_nvim_lsp").default_capabilities() local lspconfig = require("lspconfig") - bind_filetype("*.wgsl", "wgsl") - require("mason-lspconfig").setup({ handlers = { -- default handler