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

View file

@ -52,8 +52,9 @@ command! -nargs=0 C :e $MYVIMRC
" Type ':R' to reload config file " Type ':R' to reload config file
command! -nargs=0 R :source $MYVIMRC 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 ZZ :wa<CR>:qa<CR>
nnoremap <C-c> :wa<CR>:qa<CR>
" Exit Terminal mode with Ctrl+k " Exit Terminal mode with Ctrl+k
tnoremap <C-k> <C-\><C-n> tnoremap <C-k> <C-\><C-n>

View file

@ -36,6 +36,7 @@ require("lazy").setup({
"coc-tsserver", "coc-tsserver",
"@yaegassy/coc-volar", "@yaegassy/coc-volar",
"coc-svelte", "coc-svelte",
"@yaegassy/coc-astro",
"@yaegassy/coc-tailwindcss3", "@yaegassy/coc-tailwindcss3",
"coc-emmet", "coc-emmet",
"coc-prettier", "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_command("autocmd BufWritePre *.go :call CocAction('runCommand', 'editor.action.organizeImport')")
vim.api.nvim_exec([[autocmd BufNewFile,BufRead *.astro set filetype=astro]], false)
end end
}, },
@ -56,6 +58,15 @@ require("lazy").setup({
end 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 -- Add two-character motions with s and S
{ {
"ggandor/leap.nvim", "ggandor/leap.nvim",