feat(filetypes): Declare the wgsl in the same lua module as others
This commit is contained in:
parent
442e0430b7
commit
0035b4c016
|
@ -11,5 +11,6 @@ vim.filetype.add({
|
|||
return "typst"
|
||||
end,
|
||||
idr = "idris2",
|
||||
wgsl = "wgsl",
|
||||
},
|
||||
})
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue