@@ -248,6 +248,12 @@ vim.opt.rtp:prepend(lazypath)
248248-- NOTE: Here is where you install your plugins.
249249require (' lazy' ).setup ({
250250 -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
251+ {
252+ ' pmizio/typescript-tools.nvim' ,
253+ dependencies = { ' nvim-lua/plenary.nvim' , ' neovim/nvim-lspconfig' },
254+ opts = {},
255+ },
256+ ' mg979/vim-visual-multi' ,
251257 ' tpope/vim-sleuth' , -- Detect tabstop and shiftwidth automatically
252258
253259 -- NOTE: Plugins can also be added by using a table,
@@ -527,8 +533,9 @@ require('lazy').setup({
527533 -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
528534 { ' j-hui/fidget.nvim' , opts = {} },
529535
530- -- Allows extra capabilities provided by nvim-cmp
531- ' hrsh7th/cmp-nvim-lsp' ,
536+ -- `neodev` configures Lua LSP for your Neovim config, runtime and plugins
537+ -- used for completion, annotations and signatures of Neovim apis
538+ { ' folke/neodev.nvim' , opts = {} },
532539 },
533540 config = function ()
534541 -- Brief aside: **What is LSP?**
@@ -686,8 +693,25 @@ require('lazy').setup({
686693 -- Some languages (like typescript) have entire language plugins that can be useful:
687694 -- https://github.com/pmizio/typescript-tools.nvim
688695 --
689- -- But for many setups, the LSP (`ts_ls`) will work just fine
690- -- ts_ls = {},
696+ -- But for many setups, the LSP (`tsserver`) will work just fine
697+ tsserver = {
698+ init_options = {
699+ plugins = {
700+ {
701+ name = ' @vue/typescript-plugin' ,
702+ languages = { ' vue' },
703+ },
704+ },
705+ },
706+ },
707+ volar = {
708+ filetypes = { ' typescript' , ' javascript' , ' javascriptreact' , ' typescriptreact' , ' vue' },
709+ init_options = {
710+ vue = {
711+ hybridMode = false ,
712+ },
713+ },
714+ },
691715 --
692716 pylsp = {},
693717 cmake = {},
@@ -758,7 +782,7 @@ require('lazy').setup({
758782 -- Disable "format_on_save lsp_fallback" for languages that don't
759783 -- have a well standardized coding style. You can add additional
760784 -- languages here or re-enable it for the disabled ones.
761- local disable_filetypes = { c = true , cpp = true }
785+ local disable_filetypes = { c = true , cpp = true , py = true , ts = true , vue = true }
762786 local lsp_format_opt
763787 if disable_filetypes [vim .bo [bufnr ].filetype ] then
764788 lsp_format_opt = ' never'
@@ -776,10 +800,13 @@ require('lazy').setup({
776800 json = { ' clang-format-15' },
777801 lua = { ' stylua' },
778802 -- Conform can also run multiple formatters sequentially
779- python = { ' isort ' },
803+ python = { ' ruff ' },
780804 --
781- -- You can use 'stop_after_first' to run the first available formatter from the list
782- -- javascript = { "prettierd", "prettier", stop_after_first = true },
805+ -- You can use a sub-list to tell conform to run *until* a formatter
806+ -- is found.
807+ -- javascript = { 'prettier' },
808+ -- vue = { 'prettier' },
809+ -- typescript = { 'prettier' },
783810 },
784811 },
785812 },
0 commit comments