Add a wgsl filetype and change LSP confirm to Enter
This commit is contained in:
parent
c046282675
commit
f75f4fe267
12
init.lua
12
init.lua
|
@ -187,6 +187,16 @@ vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right win
|
|||
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
|
||||
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { 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.
|
||||
['<C-y>'] = cmp.mapping.confirm { select = true },
|
||||
['<Enter>'] = cmp.mapping.confirm { select = true },
|
||||
|
||||
-- Manually trigger a completion from nvim-cmp.
|
||||
-- Generally you don't need this, because nvim-cmp will display
|
||||
|
|
Loading…
Reference in New Issue