Compare commits
No commits in common. "b8742d622660e48a10e6ea756a4681f79d0cd52f" and "7eeae5d3253ed119394b4aed528202af5e75402d" have entirely different histories.
b8742d6226
...
7eeae5d325
2 changed files with 2 additions and 22 deletions
|
@ -14,17 +14,6 @@ local function toggle_win_opt(name)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function toggle_current_win_diagnostic()
|
|
||||||
local d = vim.diagnostic
|
|
||||||
if d.is_disabled(0, nil) then
|
|
||||||
d.enable(0, nil)
|
|
||||||
vim.notify('Enabling diagnostic')
|
|
||||||
else
|
|
||||||
d.disable(0, nil)
|
|
||||||
vim.notify('Disabling diagnostic')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function M.setup()
|
function M.setup()
|
||||||
vim.keymap.set('n', '<S-Down>', '<C-E>')
|
vim.keymap.set('n', '<S-Down>', '<C-E>')
|
||||||
vim.keymap.set('n', '<S-Up>', '<C-Y>')
|
vim.keymap.set('n', '<S-Up>', '<C-Y>')
|
||||||
|
@ -45,7 +34,6 @@ function M.setup()
|
||||||
vim.keymap.set('n', '<leader>on', function() toggle_win_opt('number') end, { desc = 'Toggle number' })
|
vim.keymap.set('n', '<leader>on', function() toggle_win_opt('number') end, { desc = 'Toggle number' })
|
||||||
vim.keymap.set('n', '<leader>or', function() toggle_win_opt('relativenumber') end, { desc = 'Toggle relativenumber' })
|
vim.keymap.set('n', '<leader>or', function() toggle_win_opt('relativenumber') end, { desc = 'Toggle relativenumber' })
|
||||||
vim.keymap.set('n', '<leader>oR', require('configs.options').setup, { desc = 'RESET' })
|
vim.keymap.set('n', '<leader>oR', require('configs.options').setup, { desc = 'RESET' })
|
||||||
vim.keymap.set('n', '<leader>od', toggle_current_win_diagnostic, { desc = 'Toggle diagnostic' })
|
|
||||||
vim.keymap.set('n', '<leader>of', function()
|
vim.keymap.set('n', '<leader>of', function()
|
||||||
if (vim.api.nvim_win_get_option(0, 'foldmethod') ~= 'marker') then
|
if (vim.api.nvim_win_get_option(0, 'foldmethod') ~= 'marker') then
|
||||||
vim.api.nvim_win_set_option(0, 'foldmethod', 'marker')
|
vim.api.nvim_win_set_option(0, 'foldmethod', 'marker')
|
||||||
|
|
|
@ -129,7 +129,7 @@ end
|
||||||
|
|
||||||
local function update_attached(bufnr)
|
local function update_attached(bufnr)
|
||||||
local attached = '';
|
local attached = '';
|
||||||
for _, client in pairs(vim.lsp.get_clients({ bufnr = bufnr })) do
|
for _, client in pairs(vim.lsp.get_active_clients({ bufnr = bufnr })) do
|
||||||
attached = attached .. ',' .. client.name
|
attached = attached .. ',' .. client.name
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -141,10 +141,6 @@ local function on_attach(args) -- {{{
|
||||||
|
|
||||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||||
|
|
||||||
if client == nil then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if (client.server_capabilities.documentSymbolProvider) then
|
if (client.server_capabilities.documentSymbolProvider) then
|
||||||
navic_attach(client, bufnr)
|
navic_attach(client, bufnr)
|
||||||
end
|
end
|
||||||
|
@ -180,14 +176,11 @@ local function on_attach(args) -- {{{
|
||||||
-- (note, if the height of the float would be greater than the space left above the cursor, it will default
|
-- (note, if the height of the float would be greater than the space left above the cursor, it will default
|
||||||
-- to placing the float below the cursor. The max_height option allows for finer tuning of this)
|
-- to placing the float below the cursor. The max_height option allows for finer tuning of this)
|
||||||
},
|
},
|
||||||
display_automatically = true,
|
|
||||||
silent = true,
|
|
||||||
keymaps = {
|
keymaps = {
|
||||||
next_signature = '<C-j>',
|
next_signature = '<C-j>',
|
||||||
previous_signature = '<C-k>',
|
previous_signature = '<C-k>',
|
||||||
next_parameter = '<C-l>',
|
next_parameter = '<C-l>',
|
||||||
previous_parameter = '<C-h>',
|
previous_parameter = '<C-h>',
|
||||||
close_signature = '',
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -222,7 +215,7 @@ local function on_attach(args) -- {{{
|
||||||
)
|
)
|
||||||
|
|
||||||
if (formatting_filter(client)) then
|
if (formatting_filter(client)) then
|
||||||
vim.api.nvim_set_option_value('formatexpr', 'v:lua.vim.lsp.formatexpr(#{timeout_ms:250})', {buf= bufnr})
|
vim.api.nvim_buf_set_option(bufnr, 'formatexpr', 'v:lua.vim.lsp.formatexpr(#{timeout_ms:250})')
|
||||||
end
|
end
|
||||||
|
|
||||||
if client.name == 'omnisharp' then
|
if client.name == 'omnisharp' then
|
||||||
|
@ -392,7 +385,6 @@ return {
|
||||||
{ 'Issafalcon/lsp-overloads.nvim', lazy = true },
|
{ 'Issafalcon/lsp-overloads.nvim', lazy = true },
|
||||||
{
|
{
|
||||||
'someone-stole-my-name/yaml-companion.nvim',
|
'someone-stole-my-name/yaml-companion.nvim',
|
||||||
lazy = true,
|
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ 'neovim/nvim-lspconfig' },
|
{ 'neovim/nvim-lspconfig' },
|
||||||
{ 'nvim-lua/plenary.nvim' },
|
{ 'nvim-lua/plenary.nvim' },
|
||||||
|
|
Loading…
Add table
Reference in a new issue