Added some plugins and lsp configs
parent
d2c1c04fad
commit
19457c1f36
15
README.md
15
README.md
|
|
@ -13,10 +13,21 @@ sudo apt install gcc ripgrep unzip java-common default-jre luarocks cmake libbin
|
||||||
## Language servers:
|
## Language servers:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
:MasonInstall clangd
|
||||||
:MasonInstall lua-language-server@3.15.0
|
:MasonInstall lua-language-server@3.15.0
|
||||||
:MasonInstall typescript-language-server
|
:MasonInstall luacheck
|
||||||
:MasonInstall vue-language-server
|
|
||||||
:MasonInstall rust-analyzer
|
:MasonInstall rust-analyzer
|
||||||
|
:MasonInstall shellcheck
|
||||||
|
:MasonInstall vtsls
|
||||||
|
:MasonInstall vue-language-server
|
||||||
|
:MasonInstall yaml-language-server
|
||||||
|
:MasonInstall css-lsp
|
||||||
|
:MasonInstall docker-langauge-server
|
||||||
|
```
|
||||||
|
|
||||||
|
To get vue working:
|
||||||
|
```
|
||||||
|
npm install -g @vtsls/language-server
|
||||||
```
|
```
|
||||||
|
|
||||||
## NerdFont
|
## NerdFont
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
-- Configs are merged with vim.tbl_deep_extend() using 'force' strategy.
|
||||||
|
-- This usually works fine, but lua "arrays" like filetypes are replaced.
|
||||||
|
return {
|
||||||
|
filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' },
|
||||||
|
}
|
||||||
5
init.lua
5
init.lua
|
|
@ -3,8 +3,11 @@ require 'spec'
|
||||||
|
|
||||||
spec 'plugin/colorscheme'
|
spec 'plugin/colorscheme'
|
||||||
spec 'plugin/treesitter'
|
spec 'plugin/treesitter'
|
||||||
spec 'plugin/telescope'
|
spec 'plugin/treesitter-context'
|
||||||
|
spec 'plugin/bookmarks'
|
||||||
|
spec 'plugin/telescope-bookmarks'
|
||||||
spec 'plugin/telescope-ui-select'
|
spec 'plugin/telescope-ui-select'
|
||||||
|
spec 'plugin/telescope'
|
||||||
spec 'plugin/mason'
|
spec 'plugin/mason'
|
||||||
spec 'plugin/nvimtree'
|
spec 'plugin/nvimtree'
|
||||||
spec 'plugin/nvimtree-icons'
|
spec 'plugin/nvimtree-icons'
|
||||||
|
|
|
||||||
|
|
@ -5,24 +5,29 @@
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
|
||||||
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
|
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
|
||||||
"copilot.vim": { "branch": "release", "commit": "a12fd5672110c8aa7e3c8419e28c96943ca179be" },
|
"copilot.vim": { "branch": "release", "commit": "a12fd5672110c8aa7e3c8419e28c96943ca179be" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "abf82a65f185bd54adc0679f74b7d6e1ada690c9" },
|
"edge": { "branch": "master", "commit": "7ec78c21bd8f0b2b0b47043bb1e730c561647c72" },
|
||||||
|
"gitsigns.nvim": { "branch": "main", "commit": "5c569562d9f9c98f12d684de5f37150e0ca1b12d" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||||
"lspkind.nvim": { "branch": "master", "commit": "3ddd1b4edefa425fda5a9f95a4f25578727c0bb3" },
|
"lspkind.nvim": { "branch": "master", "commit": "c7274c48137396526b59d86232eabcdc7fed8a32" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "fe661093f4b05136437b531e7f959af2a2ae66c8" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "a979821a975897b88493843301950c456a725982" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
|
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "c2a0dd0d931d0fb07665e1fedb1ea688da3b80b4" },
|
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "85bbfad83f804f11688d1ab9486b459e699292d6" },
|
"nvim-cmp": { "branch": "main", "commit": "da88697d7f45d16852c6b2769dc52387d1ddc45f" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "92ee7d42320edfbb81f3cad851314ab197fa324a" },
|
"nvim-lspconfig": { "branch": "master", "commit": "841c6d4139aedb8a3f2baf30cef5327371385b93" },
|
||||||
"nvim-tree.lua": { "branch": "master", "commit": "b8b44b6a2494d086a9177251a119f9daec6cace8" },
|
"nvim-tree.lua": { "branch": "master", "commit": "3d385d3346e4883d60dc37cf642bd47bed78a46e" },
|
||||||
"nvim-treesitter": { "branch": "main", "commit": "5a7e5638e7d220575b1c22c8a2e099b52231886e" },
|
"nvim-treesitter": { "branch": "main", "commit": "6620ae1c44dfa8623b22d0cbf873a9e8d073b849" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "6788013bb9cb784e606ada44206b0e755e4323d7" },
|
"nvim-treesitter-context": { "branch": "master", "commit": "adf4b6b0420b7be6c717ef0ac7993183d6c201b1" },
|
||||||
|
"nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" },
|
||||||
|
"oxocarbon.nvim": { "branch": "main", "commit": "a7ba74849a00546a311f8c146320b433900393e7" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "3333a52ff548ba0a68af6d8da1e54f9cd96e9179" },
|
"telescope-vim-bookmarks.nvim": { "branch": "main", "commit": "09a61043496bd9c4240955f7532ff2ae8fe3a905" },
|
||||||
|
"telescope.nvim": { "branch": "master", "commit": "5255aa27c422de944791318024167ad5d40aad20" },
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
||||||
"toggleterm.nvim": { "branch": "main", "commit": "9a88eae817ef395952e08650b3283726786fb5fb" },
|
"toggleterm.nvim": { "branch": "main", "commit": "9a88eae817ef395952e08650b3283726786fb5fb" },
|
||||||
"tokyonight.nvim": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" },
|
"tokyonight.nvim": { "branch": "main", "commit": "73822773d5badaeba999206179a9105f9867ac59" },
|
||||||
|
"vim-bookmarks": { "branch": "master", "commit": "9cc5fa7ecc23b052bd524d07c85356c64b92aeef" },
|
||||||
"vim-smartword": { "branch": "master", "commit": "608d4883bb1eff4131f44857a21119220e55886d" },
|
"vim-smartword": { "branch": "master", "commit": "608d4883bb1eff4131f44857a21119220e55886d" },
|
||||||
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,73 @@
|
||||||
return {
|
return {
|
||||||
cmd = { 'lua-language-server' },
|
|
||||||
filetypes = { 'lua' },
|
|
||||||
root_markers = { '.luarc.json', '.luarc.jsonc' },
|
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
runtime = { version = 'LuaJIT' },
|
runtime = { version = 'LuaJIT' },
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
globals = { 'vim' },
|
globals = {
|
||||||
|
-- Vim configs
|
||||||
|
'vim',
|
||||||
|
-- Solar2D
|
||||||
|
'_G',
|
||||||
|
'al',
|
||||||
|
'assert',
|
||||||
|
'audio',
|
||||||
|
'cloneArray',
|
||||||
|
'collectgarbage',
|
||||||
|
'coronabaselib',
|
||||||
|
'coroutine',
|
||||||
|
'debug',
|
||||||
|
'display',
|
||||||
|
'dofile',
|
||||||
|
'easing',
|
||||||
|
'error',
|
||||||
|
'gcinfo',
|
||||||
|
'getfenv',
|
||||||
|
'getmetatable',
|
||||||
|
'graphics',
|
||||||
|
'io',
|
||||||
|
'ipairs',
|
||||||
|
'lfs',
|
||||||
|
'load',
|
||||||
|
'loadfile',
|
||||||
|
'loadstring',
|
||||||
|
'lpeg',
|
||||||
|
'math',
|
||||||
|
'media',
|
||||||
|
'metatable',
|
||||||
|
'module',
|
||||||
|
'native',
|
||||||
|
'network',
|
||||||
|
'newproxy',
|
||||||
|
'next',
|
||||||
|
'os',
|
||||||
|
'package',
|
||||||
|
'pairs',
|
||||||
|
'pcall',
|
||||||
|
'physics',
|
||||||
|
'print',
|
||||||
|
'rawequal',
|
||||||
|
'rawget',
|
||||||
|
'rawset',
|
||||||
|
'require',
|
||||||
|
'Runtime',
|
||||||
|
'select',
|
||||||
|
'sendLaunchAnalytics',
|
||||||
|
'setfenv',
|
||||||
|
'setmetatable',
|
||||||
|
'string',
|
||||||
|
'system',
|
||||||
|
'table',
|
||||||
|
'timer',
|
||||||
|
'tonumber',
|
||||||
|
'tostring',
|
||||||
|
'transition',
|
||||||
|
'type',
|
||||||
|
'unpack',
|
||||||
|
'xpcall',
|
||||||
|
'application',
|
||||||
|
'settings',
|
||||||
|
'utils',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
workspace = {
|
workspace = {
|
||||||
library = vim.tbl_deep_extend('force', vim.api.nvim_get_runtime_file('', true), { '${3rd}/love2d/library' }),
|
library = vim.tbl_deep_extend('force', vim.api.nvim_get_runtime_file('', true), { '${3rd}/love2d/library' }),
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
-- For Mason v2, use either of these:
|
||||||
|
-- local vue_language_server_path = vim.fn.expand '$MASON/packages' .. '/vue-language-server' .. '/node_modules/@vue/language-server'
|
||||||
|
-- local vue_language_server_path = vim.fn.stdpath('data') .. "/mason/packages/vue-language-server/node_modules/@vue/language-server"
|
||||||
|
|
||||||
|
local vue_language_server_path = vim.fn.stdpath('data') ..
|
||||||
|
"/mason/packages/vue-language-server/node_modules/@vue/language-server"
|
||||||
|
local vue_plugin = {
|
||||||
|
name = '@vue/typescript-plugin',
|
||||||
|
location = vue_language_server_path,
|
||||||
|
languages = { 'vue' },
|
||||||
|
configNamespace = 'typescript',
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
settings = {
|
||||||
|
vtsls = {
|
||||||
|
tsserver = {
|
||||||
|
globalPlugins = {
|
||||||
|
vue_plugin,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -2,6 +2,9 @@ local tab_width = 4
|
||||||
|
|
||||||
vim.g.mapleader = ' '
|
vim.g.mapleader = ' '
|
||||||
|
|
||||||
|
vim.opt.ignorecase = true
|
||||||
|
vim.opt.smartcase = true
|
||||||
|
|
||||||
vim.opt.number = true
|
vim.opt.number = true
|
||||||
vim.opt.relativenumber = true
|
vim.opt.relativenumber = true
|
||||||
vim.opt.cursorline = true
|
vim.opt.cursorline = true
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,12 @@ local enable = vim.lsp.enable
|
||||||
-- When calling `enable 'foo'`, there must be a given file in either:
|
-- When calling `enable 'foo'`, there must be a given file in either:
|
||||||
-- * `~/.config/nvim/lsp/foo.lua`
|
-- * `~/.config/nvim/lsp/foo.lua`
|
||||||
-- * https://github.com/neovim/nvim-lspconfig/tree/master/lsp
|
-- * https://github.com/neovim/nvim-lspconfig/tree/master/lsp
|
||||||
-- you can then further configure them with `vim.lsp.config('foo'. {...})`
|
-- * `~/.config/nvim/after/lsp/foo.lua`
|
||||||
|
|
||||||
enable 'lua_ls'
|
enable 'lua_ls'
|
||||||
enable 'rust_analyzer'
|
enable 'rust_analyzer'
|
||||||
enable 'ts_ls'
|
enable 'vtsls'
|
||||||
enable 'vue_ls'
|
enable 'vue_ls'
|
||||||
|
enable 'clangd'
|
||||||
|
enable 'docker_language_server'
|
||||||
|
enable 'cssls'
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
local M = {
|
||||||
|
'MattesGroeger/vim-bookmarks',
|
||||||
|
}
|
||||||
|
|
||||||
|
return M
|
||||||
|
|
@ -1,11 +1,22 @@
|
||||||
local M = {
|
local M = {
|
||||||
'folke/tokyonight.nvim',
|
'folke/tokyonight.nvim',
|
||||||
|
dependencies = {
|
||||||
|
'nyoom-engineering/oxocarbon.nvim',
|
||||||
|
'sainnhe/edge',
|
||||||
|
},
|
||||||
lazy = false, -- load colorscheme immediately
|
lazy = false, -- load colorscheme immediately
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
}
|
}
|
||||||
|
|
||||||
M.config = function()
|
M.config = function()
|
||||||
vim.cmd.colorscheme 'tokyonight-night'
|
vim.opt.background =
|
||||||
|
'light'
|
||||||
|
-- 'dark'
|
||||||
|
|
||||||
|
vim.cmd.colorscheme
|
||||||
|
-- 'tokyonight'
|
||||||
|
-- 'oxocarbon'
|
||||||
|
'edge'
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
local M = {
|
||||||
|
'tom-anders/telescope-vim-bookmarks.nvim'
|
||||||
|
}
|
||||||
|
|
||||||
|
return M
|
||||||
|
|
@ -56,10 +56,12 @@ function M.config()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
telescope.load_extension 'ui-select'
|
telescope.load_extension 'ui-select'
|
||||||
|
telescope.load_extension 'vim_bookmarks'
|
||||||
end
|
end
|
||||||
|
|
||||||
M.keymap = function()
|
M.keymap = function()
|
||||||
local builtin = require 'telescope.builtin'
|
local builtin = require 'telescope.builtin'
|
||||||
|
local bookmarks = require 'telescope'.extensions.vim_bookmarks
|
||||||
vim.keymap.set('n', '<leader>f', builtin.find_files, { desc = 'Find files' })
|
vim.keymap.set('n', '<leader>f', builtin.find_files, { desc = 'Find files' })
|
||||||
vim.keymap.set('n', '<leader>r', builtin.resume, { desc = 'Resume last search' })
|
vim.keymap.set('n', '<leader>r', builtin.resume, { desc = 'Resume last search' })
|
||||||
vim.keymap.set('n', '<s-f>', function() builtin.grep_string { word_match = '-w' } end,
|
vim.keymap.set('n', '<s-f>', function() builtin.grep_string { word_match = '-w' } end,
|
||||||
|
|
@ -75,6 +77,7 @@ M.keymap = function()
|
||||||
max_results = 10000,
|
max_results = 10000,
|
||||||
temp__scrolling_limit = 10000,
|
temp__scrolling_limit = 10000,
|
||||||
} end, { desc = 'Git status' })
|
} end, { desc = 'Git status' })
|
||||||
|
vim.keymap.set('n', 'ma', bookmarks.all, { desc = 'List bookmarks' })
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
local M = {
|
||||||
|
'nvim-treesitter/nvim-treesitter-context',
|
||||||
|
opts = {},
|
||||||
|
}
|
||||||
|
|
||||||
|
return M
|
||||||
Loading…
Reference in New Issue