Working vue setup
This commit is contained in:
@@ -1,4 +1,9 @@
|
|||||||
-- TODO: Read until 817
|
-- TODO: Read until 817
|
||||||
|
-- external requirements
|
||||||
|
-- - use nvm and install @vue/typescript-plugin globally
|
||||||
|
-- then ts_ls will use it for vue parsing. It is already in the arch install script.
|
||||||
|
local nvm_bin = os.getenv 'NVM_BIN'
|
||||||
|
local vue_typescript_plugin_path = nvm_bin .. '/../lib/node_modules/@vue/typescript-plugin'
|
||||||
|
|
||||||
-- "<leader>sh" to [s]earch the [h]elp documentation.
|
-- "<leader>sh" to [s]earch the [h]elp documentation.
|
||||||
|
|
||||||
@@ -600,9 +605,9 @@ require('lazy').setup({
|
|||||||
init_options = {
|
init_options = {
|
||||||
plugins = {
|
plugins = {
|
||||||
{
|
{
|
||||||
notify_on_errorame = '@vue/typescript-plugin',
|
name = '@vue/typescript-plugin',
|
||||||
location = '',
|
location = vue_typescript_plugin_path,
|
||||||
languages = { 'vue' },
|
languages = { 'vue', 'javascript', 'typescript' },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -610,13 +615,17 @@ require('lazy').setup({
|
|||||||
},
|
},
|
||||||
-- TODO: Something with this setup is not quite right
|
-- TODO: Something with this setup is not quite right
|
||||||
volar = {
|
volar = {
|
||||||
cmd = { 'npm', 'vue-language-server', '--stdio' },
|
|
||||||
init_options = {
|
init_options = {
|
||||||
vue = { hybridMode = true },
|
vue = { hybridMode = true },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
eslint = {},
|
eslint = {
|
||||||
prettierd = {},
|
init_options = {
|
||||||
|
filetypes = { 'javascript', 'javascriptreact', 'typescript', 'typescriptreact', 'vue' },
|
||||||
|
format = { enable = true },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
--prettierd = {},
|
||||||
-- TODO: end
|
-- TODO: end
|
||||||
html = {},
|
html = {},
|
||||||
cssls = {},
|
cssls = {},
|
||||||
@@ -655,6 +664,7 @@ require('lazy').setup({
|
|||||||
vim.list_extend(ensure_installed, {
|
vim.list_extend(ensure_installed, {
|
||||||
'stylua', -- Used to format Lua code
|
'stylua', -- Used to format Lua code
|
||||||
'vue-language-server',
|
'vue-language-server',
|
||||||
|
'eslint_d',
|
||||||
})
|
})
|
||||||
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
||||||
|
|
||||||
@@ -711,7 +721,7 @@ require('lazy').setup({
|
|||||||
-- python = { "isort", "black" },
|
-- python = { "isort", "black" },
|
||||||
--
|
--
|
||||||
-- You can use 'stop_after_first' to run the first available formatter from the list
|
-- You can use 'stop_after_first' to run the first available formatter from the list
|
||||||
javascript = { 'eslint', 'prettierd' },
|
javascript = { 'prettierd' },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -925,7 +935,7 @@ require('lazy').setup({
|
|||||||
--
|
--
|
||||||
-- require 'kickstart.plugins.debug',
|
-- require 'kickstart.plugins.debug',
|
||||||
-- require 'kickstart.plugins.indent_line',
|
-- require 'kickstart.plugins.indent_line',
|
||||||
-- require 'kickstart.plugins.lint',
|
require 'kickstart.plugins.lint',
|
||||||
-- require 'kickstart.plugins.autopairs',
|
-- require 'kickstart.plugins.autopairs',
|
||||||
-- require 'kickstart.plugins.neo-tree',
|
-- require 'kickstart.plugins.neo-tree',
|
||||||
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
|
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "1255518cb067e038a4755f5cb3e980f79b6ab89c" },
|
"mason-tool-installer.nvim": { "branch": "main", "commit": "1255518cb067e038a4755f5cb3e980f79b6ab89c" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
|
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
|
||||||
"mini.nvim": { "branch": "main", "commit": "51cec14696190ad5b61e6c559ae558c703b71906" },
|
"mini.nvim": { "branch": "main", "commit": "51cec14696190ad5b61e6c559ae558c703b71906" },
|
||||||
|
"nvim-lint": { "branch": "master", "commit": "9dfb77ef6c5092a19502883c02dc5a02ec648729" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "4bc481b6f0c0cf3671fc894debd0e00347089a4e" },
|
"nvim-lspconfig": { "branch": "master", "commit": "4bc481b6f0c0cf3671fc894debd0e00347089a4e" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "94ea4f436d2b59c80f02e293466c374584f03b8c" },
|
"nvim-treesitter": { "branch": "master", "commit": "94ea4f436d2b59c80f02e293466c374584f03b8c" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "2c2b4eafce6cdd0cb165036faa17396eff18f847" },
|
"nvim-web-devicons": { "branch": "master", "commit": "2c2b4eafce6cdd0cb165036faa17396eff18f847" },
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ return {
|
|||||||
local lint = require 'lint'
|
local lint = require 'lint'
|
||||||
lint.linters_by_ft = {
|
lint.linters_by_ft = {
|
||||||
markdown = { 'markdownlint' },
|
markdown = { 'markdownlint' },
|
||||||
|
javascript = { 'eslint_d' },
|
||||||
|
typescript = { 'eslint_d' },
|
||||||
}
|
}
|
||||||
|
|
||||||
-- To allow other plugins to add linters to require('lint').linters_by_ft,
|
-- To allow other plugins to add linters to require('lint').linters_by_ft,
|
||||||
|
|||||||
10
.config/requirements/install-arch.sh
Executable file
10
.config/requirements/install-arch.sh
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Installs requirements for my arch setup.
|
||||||
|
|
||||||
|
sudo pacman -S \
|
||||||
|
neovim \
|
||||||
|
fd \
|
||||||
|
tmux \
|
||||||
|
nvm
|
||||||
|
|
||||||
|
npm install -g @vue/typescript-plugin
|
||||||
Reference in New Issue
Block a user