Compare commits
3 Commits
77452d989d
...
6c0c906cb2
Author | SHA1 | Date | |
---|---|---|---|
6c0c906cb2 | |||
378c8b0be4 | |||
4072fd3ccf |
@ -38,8 +38,10 @@ return {
|
|||||||
'clangd',
|
'clangd',
|
||||||
'cmake',
|
'cmake',
|
||||||
'jsonls',
|
'jsonls',
|
||||||
'lua_ls',
|
|
||||||
'lemminx',
|
'lemminx',
|
||||||
|
'lua_ls',
|
||||||
|
'pyright',
|
||||||
|
'ruff_lsp',
|
||||||
'vimls',
|
'vimls',
|
||||||
'yamlls',
|
'yamlls',
|
||||||
},
|
},
|
||||||
@ -53,8 +55,7 @@ return {
|
|||||||
|
|
||||||
['lua_ls'] = function()
|
['lua_ls'] = function()
|
||||||
require('neodev').setup()
|
require('neodev').setup()
|
||||||
local lspconfig = require('lspconfig')
|
require('lspconfig').lua_ls.setup({
|
||||||
lspconfig.lua_ls.setup({
|
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
@ -64,7 +65,19 @@ return {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
end
|
end,
|
||||||
|
|
||||||
|
['pyright'] = function()
|
||||||
|
require('lspconfig').pyright.setup({
|
||||||
|
settings = {
|
||||||
|
pyright = {
|
||||||
|
-- Using Ruff's import organizer
|
||||||
|
disableOrganizeImports = true,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -110,13 +123,14 @@ return {
|
|||||||
vim.keymap.set('n', '<leader>fi',
|
vim.keymap.set('n', '<leader>fi',
|
||||||
require("actions-preview").code_actions, opts)
|
require("actions-preview").code_actions, opts)
|
||||||
|
|
||||||
-- Goto definition mapping
|
-- Goto mappings
|
||||||
|
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
|
||||||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
|
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
|
||||||
-- TODO: nnoremap <silent> <leader>gt <Plug>(coc-type-definition)
|
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts)
|
||||||
-- TODO: nnoremap <silent> <leader>gu <Plug>(coc-references-used)
|
vim.keymap.set('n', '<leader>D', vim.lsp.buf.type_definition, opts)
|
||||||
|
|
||||||
-- Get references to symbol under cursor, store in quickfix window
|
-- Get references to symbol under cursor, store in quickfix window
|
||||||
vim.keymap.set('n', '<leader>gr', vim.lsp.buf.references, opts)
|
vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts)
|
||||||
|
|
||||||
-- Refactoring mappings
|
-- Refactoring mappings
|
||||||
vim.keymap.set('n', '<leader>rn', vim.lsp.buf.rename, opts)
|
vim.keymap.set('n', '<leader>rn', vim.lsp.buf.rename, opts)
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
return {
|
|
||||||
'tummetott/unimpaired.nvim',
|
|
||||||
config = function()
|
|
||||||
require('unimpaired').setup({})
|
|
||||||
end
|
|
||||||
}
|
|
5
lua/plugins/utilities.lua
Normal file
5
lua/plugins/utilities.lua
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
return {
|
||||||
|
{ 'tummetott/unimpaired.nvim' },
|
||||||
|
{ 'stevearc/dressing.nvim' },
|
||||||
|
{ 'kevinhwang91/nvim-bqf' },
|
||||||
|
}
|
@ -121,7 +121,11 @@ function statusline.active()
|
|||||||
-- loclist flag, query the window info.
|
-- loclist flag, query the window info.
|
||||||
local info = vim.fn.getwininfo(vim.fn.win_getid())[1]
|
local info = vim.fn.getwininfo(vim.fn.win_getid())[1]
|
||||||
if mode == 'Normal' then
|
if mode == 'Normal' then
|
||||||
if info.loclist then mode = 'Location' else mode = 'Quickfix' end
|
if info.loclist == 1 then
|
||||||
|
mode = 'Location'
|
||||||
|
else
|
||||||
|
mode = 'Quickfix'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
local title = info.variables.quickfix_title
|
local title = info.variables.quickfix_title
|
||||||
return special('StatusLineLight', mode, title)
|
return special('StatusLineLight', mode, title)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user