diff --git a/init.lua b/init.lua index f3515b86..dd8c9def 100644 --- a/init.lua +++ b/init.lua @@ -187,6 +187,16 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the right win vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) +-- [[ Custom Filetypes ]] + +-- Define a filetype for `.wgsl` files +vim.api.nvim_create_autocmd({ 'BufNewFile', 'BufRead' }, { + pattern = '*.wgsl', + callback = function() + vim.bo.filetype = 'wgsl' + end, +}) + -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands` @@ -704,7 +714,7 @@ require('lazy').setup({ -- Accept ([y]es) the completion. -- This will auto-import if your LSP supports it. -- This will expand snippets if the LSP sent a snippet. - [''] = cmp.mapping.confirm { select = true }, + [''] = cmp.mapping.confirm { select = true }, -- Manually trigger a completion from nvim-cmp. -- Generally you don't need this, because nvim-cmp will display