This commit is contained in:
parent
365e0feddc
commit
ce19d6a62c
24 changed files with 212 additions and 96 deletions
|
|
@ -9,7 +9,7 @@ vim.wo.relativenumber = true
|
|||
vim.o.mouse = 'a'
|
||||
|
||||
-- Indentation
|
||||
vim.o.tabstop = 8
|
||||
vim.o.tabstop = 4
|
||||
vim.o.expandtab = true
|
||||
vim.o.shiftwidth = 4
|
||||
vim.o.autoindent = true
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
local servers = {
|
||||
bashls = {},
|
||||
cmake = {},
|
||||
clangd = {},
|
||||
eslint = {},
|
||||
gopls = {},
|
||||
|
|
@ -8,9 +9,12 @@ local servers = {
|
|||
kotlin_language_server = {},
|
||||
lua_ls = require('lsp.lua_ls'),
|
||||
pyright = {},
|
||||
ruby_lsp = {},
|
||||
rust_analyzer = {},
|
||||
ts_ls = {},
|
||||
ruby_lsp = {},
|
||||
yamlls = require('lsp.yamlls'),
|
||||
jsonls = {},
|
||||
svls = {}
|
||||
}
|
||||
|
||||
vim.lsp.set_log_level("debug")
|
||||
|
|
@ -44,22 +48,6 @@ end
|
|||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
local lspconfig = require('lspconfig')
|
||||
|
||||
for server_name, config in pairs(servers) do
|
||||
lspconfig[server_name].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
[server_name] = config ~= {} and {
|
||||
settings = {
|
||||
[server_name] = {
|
||||
config
|
||||
}
|
||||
}
|
||||
} or {}
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
for server_name, config in pairs(servers) do
|
||||
lspconfig[server_name].setup(vim.tbl_deep_extend('keep', {
|
||||
capabilities = capabilities,
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
return {
|
||||
root_dir = vim.fs.dirname(vim.fs.find({'gradlew', '.git', 'mvnw'}, { upward = true })[1]),
|
||||
settings = {
|
||||
root_dir = vim.fs.dirname(vim.fs.find({'gradlew', '.git', 'mvnw'}, { upward = true })[1]),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
return {
|
||||
Lua = {
|
||||
workspace = {
|
||||
checkThirdParty = true,
|
||||
library = {
|
||||
vim.env.VIMRUNTIME
|
||||
}
|
||||
settings = {
|
||||
Lua = {
|
||||
workspace = {
|
||||
checkThirdParty = true,
|
||||
library = {
|
||||
vim.env.VIMRUNTIME
|
||||
}
|
||||
},
|
||||
telemetry = { enable = false },
|
||||
},
|
||||
telemetry = { enable = false },
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
9
.config/nvim/lua/lsp/yamlls.lua
Normal file
9
.config/nvim/lua/lsp/yamlls.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
return {
|
||||
settings = {
|
||||
redhat = {
|
||||
telemetry = {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,9 @@
|
|||
return {
|
||||
'isobit/vim-caddyfile',
|
||||
'rcarriga/nvim-notify',
|
||||
'stefandtw/quickfix-reflector.vim',
|
||||
'tpope/vim-fugitive',
|
||||
'junegunn/vim-peekaboo',
|
||||
'tpope/vim-sleuth',
|
||||
'vim-scripts/iptables',
|
||||
{ 'akinsho/bufferline.nvim', opts = {}, dependencies = { 'navarasu/onedark.nvim' } },
|
||||
|
|
@ -12,4 +14,5 @@ return {
|
|||
{ 'norcalli/nvim-colorizer.lua', opts={ '*' }, dependencies = { 'navarasu/onedark.nvim' } },
|
||||
-- { 'wakatime/vim-wakatime', event = 'VeryLazy' },
|
||||
{ 'williamboman/mason.nvim', opts = {} },
|
||||
'Winseven4lyf/vim-bbcode',
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
return {
|
||||
'junegunn/vim-peekaboo',
|
||||
config = function ()
|
||||
vim.g.peekaboo_window = 'enew'
|
||||
end
|
||||
}
|
||||
|
|
@ -7,12 +7,16 @@ return {
|
|||
build = ':TSUpdate',
|
||||
config = function()
|
||||
vim.defer_fn(function()
|
||||
-- - @diagnostic disable-next-line: missing-fields
|
||||
--- @diagnostic disable-next-line: missing-fields
|
||||
require('nvim-treesitter.configs').setup({
|
||||
auto_install = true,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
})
|
||||
|
||||
require('treesitter-context').setup {
|
||||
max_lines = 6
|
||||
}
|
||||
end, 0)
|
||||
end
|
||||
}
|
||||
|
|
|
|||
30
.config/nvim/lua/plugins/ufo.lua
Normal file
30
.config/nvim/lua/plugins/ufo.lua
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
return {
|
||||
-- 'kevinhwang91/nvim-ufo',
|
||||
-- dependencies = {
|
||||
-- 'kevinhwang91/promise-async'
|
||||
-- },
|
||||
-- config = function()
|
||||
-- vim.defer_fn(function()
|
||||
-- vim.o.foldcolumn = '0'
|
||||
-- vim.o.foldlevel = 99
|
||||
-- vim.o.foldlevelstart = 99
|
||||
-- vim.o.foldenable = true
|
||||
--
|
||||
-- vim.keymap.set('n', 'zR', require('ufo').openAllFolds)
|
||||
-- vim.keymap.set('n', 'zM', require('ufo').closeAllFolds)
|
||||
--
|
||||
-- local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
-- capabilities.textDocument.foldingRange = {
|
||||
-- dynamicRegistration = false,
|
||||
-- lineFoldingOnly = true
|
||||
-- }
|
||||
-- local language_servers = vim.lsp.get_clients()
|
||||
-- for _, ls in ipairs(language_servers) do
|
||||
-- require('lspconfig')[ls].setup({
|
||||
-- capabilities = capabilities
|
||||
-- })
|
||||
-- end
|
||||
-- require('ufo').setup()
|
||||
-- end, 0)
|
||||
-- end
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue