vue support

This commit is contained in:
2025-05-01 11:16:20 +02:00
parent ea74360ede
commit f9774a6a5a
4 changed files with 114 additions and 40 deletions

View File

@@ -13,6 +13,7 @@
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
"lualine.nvim": { "branch": "master", "commit": "15884cee63a8c205334ab13ab1c891cd4d27101a" },
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "1255518cb067e038a4755f5cb3e980f79b6ab89c" },
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
@@ -37,6 +38,7 @@
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
"persistence.nvim": { "branch": "main", "commit": "166a79a55bfa7a4db3e26fc031b4d92af71d0b51" },
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
"render-markdown.nvim": { "branch": "main", "commit": "8c33733b9af902250731539b2fe3920c76993765" },
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
"telescope.nvim": { "branch": "master", "commit": "a4ed82509cecc56df1c7138920a1aeaf246c0ac5" },
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },

View File

@@ -1,6 +1,11 @@
{
"extras": [
"lazyvim.plugins.extras.lang.git",
"lazyvim.plugins.extras.lang.markdown",
"lazyvim.plugins.extras.lang.toml",
"lazyvim.plugins.extras.lang.vue",
"lazyvim.plugins.extras.lang.yaml",
"lazyvim.plugins.extras.util.gitui"
],
"install_version": 8,
"news": {

View File

@@ -0,0 +1,33 @@
return {
{
"WhoIsSethDaniel/mason-tool-installer.nvim",
opts = {
ensure_installed = {
"black",
"debugpy",
"flake8",
"isort",
"mypy",
"pylint",
"typescript-language-server",
"vue-language-server",
"eslint-lsp",
},
},
},
{
"williamboman/mason.nvim",
opts = {
ensure_installed = {
"stylua",
"shellcheck",
"shfmt",
"flake8",
"pyright",
"typescript-language-server",
"vue-language-server",
"eslint-lsp",
},
},
},
}

View File

@@ -1,5 +1,35 @@
return {
{ 'echasnovski/mini.nvim', version = '*' },
-- Testing out a nuxt setup
--{
-- 'catgoose/vue-goto-definition.nvim',
-- event = "BufReadPre",
-- opts = {
-- filters = {
-- auto_imports = true,
-- auto_components = true,
-- import_same_file = true,
-- declaration = true,
-- duplicate_filename = true,
-- },
-- filetypes = { "vue", "typescript" },
-- detection = {
-- nuxt = function()
-- return vim.fn.glob(".nuxt/") ~= ""
-- end,
-- vue3 = function()
-- return vim.fn.filereadable("vite.config.ts") == 1 or vim.fn.filereadable("src/App.vue") == 1
-- end,
-- priority = { "nuxt", "vue3" },
-- },
-- lsp = {
-- override_definition = true, -- override vim.lsp.buf.definition
-- },
-- debounce = 200
-- }
--},
-- { "rushjs1/nuxt-goto.nvim", ft = "vue" },
-- end of nuxt setup
{
"https://codeberg.org/esensar/nvim-dev-container",
dependencies = "nvim-treesitter/nvim-treesitter",
@@ -66,17 +96,49 @@ return {
},
-- add pyright to lspconfig
--{
-- "neovim/nvim-lspconfig",
-- ---@class PluginLspOpts
-- opts = {
-- ---@type lspconfig.options
-- servers = {
-- pyright = {},
-- eslint = {},
-- },
-- },
--},
{
"neovim/nvim-lspconfig",
---@class PluginLspOpts
opts = {
servers = {
pyright = {},
eslint = {},
volar = {},
tsserver = {
enabled = true,
opts = {
init_options = {
plugins = {
{
name = '@vue/typescript-plugin',
location = vim.fn.stdpath 'data' ..
'/mason/packages/vue-language-server/node_modules/@vue/language-server',
languages = { 'vue' },
},
},
},
filetypes = { "typescript", "javascript", "javascriptreact", "typescriptreact", "vue" }
},
},
ts_ls = {
enabled = true,
opts = {
init_options = {
plugins = {
{
name = '@vue/typescript-plugin',
location = vim.fn.stdpath 'data' ..
'/mason/packages/vue-language-server/node_modules/@vue/language-server',
languages = { 'vue' },
},
},
},
filetypes = { "typescript", "javascript", "javascriptreact", "typescriptreact", "vue" }
},
},
},
},
},
-- add more treesitter parsers
{
@@ -141,34 +203,6 @@ return {
-- add any tools you want to have installed below
-- Install mason installer
{
"WhoIsSethDaniel/mason-tool-installer.nvim",
opts = {
ensure_installed = {
"black",
"debugpy",
"flake8",
"isort",
"mypy",
"pylint",
},
},
},
-- Install mason itself
{
"williamboman/mason.nvim",
opts = {
ensure_installed = {
"stylua",
"shellcheck",
"shfmt",
"flake8",
"pyright",
"typescript-language-server"
},
},
},
-- Install tools for python testing
{
"nvim-neotest/neotest-python",