Add Astro support in Neovim

This commit is contained in:
Mikkel Svartveit 2023-10-17 11:31:02 -07:00
parent d4423e3dbb
commit 3f169888db
3 changed files with 14 additions and 3 deletions

View file

@ -7,6 +7,7 @@
"typescriptreact",
"vue",
"svelte",
"astro",
"html",
"css",
"json",
@ -25,7 +26,6 @@
"typescriptreact",
"html",
"vue",
"markdown",
"svelte"
],
"eslint.validate": [
@ -35,7 +35,6 @@
"typescriptreact",
"html",
"vue",
"markdown",
"svelte"
]
}

View file

@ -52,8 +52,9 @@ command! -nargs=0 C :e $MYVIMRC
" Type ':R' to reload config file
command! -nargs=0 R :source $MYVIMRC
" Save and close all buffers with ZZ
" Save and close all buffers with ZZ or Ctrl-C
nnoremap ZZ :wa<CR>:qa<CR>
nnoremap <C-c> :wa<CR>:qa<CR>
" Exit Terminal mode with Ctrl+k
tnoremap <C-k> <C-\><C-n>

View file

@ -36,6 +36,7 @@ require("lazy").setup({
"coc-tsserver",
"@yaegassy/coc-volar",
"coc-svelte",
"@yaegassy/coc-astro",
"@yaegassy/coc-tailwindcss3",
"coc-emmet",
"coc-prettier",
@ -43,6 +44,7 @@ require("lazy").setup({
}
vim.api.nvim_command("autocmd BufWritePre *.go :call CocAction('runCommand', 'editor.action.organizeImport')")
vim.api.nvim_exec([[autocmd BufNewFile,BufRead *.astro set filetype=astro]], false)
end
},
@ -56,6 +58,15 @@ require("lazy").setup({
end
},
-- Support for Astro
{
"wuelnerdotexe/vim-astro",
ft = "astro",
init = function()
vim.g.astro_typescript = "enable"
end
},
-- Add two-character motions with s and S
{
"ggandor/leap.nvim",