add ufo and update
This commit is contained in:
parent
4c2e332359
commit
e3ce7e4243
|
|
@ -1,12 +0,0 @@
|
||||||
return {
|
|
||||||
'zbirenbaum/copilot.lua',
|
|
||||||
config = function()
|
|
||||||
require('copilot').setup {}
|
|
||||||
vim.api.nvim_create_autocmd('User', {
|
|
||||||
pattern = 'BlinkCmpMenuOpen',
|
|
||||||
callback = function()
|
|
||||||
vim.b.copilot_suggestion_hidden = true
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
@ -43,4 +43,17 @@ end, { desc = 'Copy filename' })
|
||||||
|
|
||||||
require('guess-indent').setup {}
|
require('guess-indent').setup {}
|
||||||
|
|
||||||
|
local lspconfig = require 'lspconfig'
|
||||||
|
lspconfig.ruby_lsp.setup {
|
||||||
|
init_options = {
|
||||||
|
formatter = 'standard',
|
||||||
|
linters = { 'standard' },
|
||||||
|
addonSettings = {
|
||||||
|
['Ruby LSP Rails}'] = {
|
||||||
|
enablePendingMigrtationsPrompt = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
return {}
|
return {}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
return {
|
return {
|
||||||
'mrcjkb/rustaceanvim',
|
'mrcjkb/rustaceanvim',
|
||||||
version = '^5', -- Recommended
|
version = '^6', -- Recommended
|
||||||
lazy = false, -- This plugin is already lazy
|
lazy = false, -- This plugin is already lazy
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
return {
|
||||||
|
'folke/trouble.nvim',
|
||||||
|
opts = {}, -- for default options, refer to the configuration section for custom setup.
|
||||||
|
cmd = 'Trouble',
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
'<leader>xx',
|
||||||
|
'<cmd>Trouble diagnostics toggle<cr>',
|
||||||
|
desc = 'Diagnostics (Trouble)',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'<leader>xX',
|
||||||
|
'<cmd>Trouble diagnostics toggle filter.buf=0<cr>',
|
||||||
|
desc = 'Buffer Diagnostics (Trouble)',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'<leader>cs',
|
||||||
|
'<cmd>Trouble symbols toggle focus=false<cr>',
|
||||||
|
desc = 'Symbols (Trouble)',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'<leader>cl',
|
||||||
|
'<cmd>Trouble lsp toggle focus=false win.position=right<cr>',
|
||||||
|
desc = 'LSP Definitions / references / ... (Trouble)',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'<leader>xL',
|
||||||
|
'<cmd>Trouble loclist toggle<cr>',
|
||||||
|
desc = 'Location List (Trouble)',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'<leader>xQ',
|
||||||
|
'<cmd>Trouble qflist toggle<cr>',
|
||||||
|
desc = 'Quickfix List (Trouble)',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
return {
|
||||||
|
'kevinhwang91/nvim-ufo',
|
||||||
|
config = function()
|
||||||
|
vim.o.foldcolumn = '1' -- '0' is not bad
|
||||||
|
vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
|
||||||
|
vim.o.foldlevelstart = 99
|
||||||
|
vim.o.foldenable = true
|
||||||
|
|
||||||
|
vim.o.fillchars = 'eob: ,fold: ,foldopen:,foldsep: ,foldclose:'
|
||||||
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
capabilities.textDocument.foldingRange = {
|
||||||
|
dynamicRegistration = false,
|
||||||
|
lineFoldingOnly = true,
|
||||||
|
}
|
||||||
|
local language_servers = vim.lsp.get_clients() -- or list servers manually like {'gopls', 'clangd'}
|
||||||
|
for _, ls in ipairs(language_servers) do
|
||||||
|
require('lspconfig')[ls].setup {
|
||||||
|
capabilities = capabilities,
|
||||||
|
-- you can add other fields for setting up lsp server in this table
|
||||||
|
}
|
||||||
|
end
|
||||||
|
require('ufo').setup {}
|
||||||
|
end,
|
||||||
|
|
||||||
|
dependencies = { 'kevinhwang91/promise-async' },
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue