mirror of
https://github.com/tomru/nvim.git
synced 2026-03-04 06:57:15 +01:00
Merge remote-tracking branch 'origin/nb' into athos
This commit is contained in:
@@ -17,16 +17,9 @@ return {
|
|||||||
vim.opt.completeopt = { 'menu', 'menuone', 'noselect' }
|
vim.opt.completeopt = { 'menu', 'menuone', 'noselect' }
|
||||||
vim.opt.shortmess:append 'c'
|
vim.opt.shortmess:append 'c'
|
||||||
|
|
||||||
local lspkind = require 'lspkind'
|
|
||||||
lspkind.init {
|
|
||||||
symbol_map = {
|
|
||||||
Copilot = '',
|
|
||||||
},
|
|
||||||
mode = 'symbol',
|
|
||||||
}
|
|
||||||
vim.api.nvim_set_hl(0, 'CmpItemKindCopilot', { fg = '#6CC644' })
|
|
||||||
|
|
||||||
local cmp = require 'cmp'
|
local cmp = require 'cmp'
|
||||||
|
local lspkind = require 'lspkind'
|
||||||
|
lspkind.init()
|
||||||
|
|
||||||
cmp.setup {
|
cmp.setup {
|
||||||
sources = {
|
sources = {
|
||||||
@@ -54,6 +47,23 @@ return {
|
|||||||
require('luasnip').lsp_expand(args.body)
|
require('luasnip').lsp_expand(args.body)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
formatting = {
|
||||||
|
expandable_indicator = true,
|
||||||
|
fields = { 'abbr', 'kind' },
|
||||||
|
format = lspkind.cmp_format {
|
||||||
|
mode = 'symbol', -- show only symbol annotations
|
||||||
|
maxwidth = 20, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
|
||||||
|
ellipsis_char = '...', -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first)
|
||||||
|
show_labelDetails = true, -- show labelDetails in menu. Disabled by default
|
||||||
|
|
||||||
|
-- The function below will be called before any actual modifications from lspkind
|
||||||
|
-- so that you can provide more controls on popup customization. (See [#30](https://github.com/onsails/lspkind-nvim/pull/30))
|
||||||
|
-- before = function(entry, vim_item)
|
||||||
|
-- return vim_item
|
||||||
|
-- end,
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Setup up vim-dadbod
|
-- Setup up vim-dadbod
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ return {
|
|||||||
'lua_ls',
|
'lua_ls',
|
||||||
'eslint_d',
|
'eslint_d',
|
||||||
'prettier',
|
'prettier',
|
||||||
|
'ts_ls',
|
||||||
}
|
}
|
||||||
|
|
||||||
vim.list_extend(ensure_installed, servers_to_install)
|
vim.list_extend(ensure_installed, servers_to_install)
|
||||||
@@ -190,6 +191,15 @@ return {
|
|||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'onsails/lspkind-nvim',
|
||||||
|
opts = {
|
||||||
|
-- defines how annotations are shown
|
||||||
|
-- default: symbol
|
||||||
|
-- options: 'text', 'text_symbol', 'symbol_text', 'symbol'
|
||||||
|
mode = 'symbol_text',
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
'hedyhli/outline.nvim',
|
'hedyhli/outline.nvim',
|
||||||
lazy = true,
|
lazy = true,
|
||||||
@@ -198,7 +208,7 @@ return {
|
|||||||
{ '<leader>co', '<cmd>Outline<CR>', desc = 'Toggle outline' },
|
{ '<leader>co', '<cmd>Outline<CR>', desc = 'Toggle outline' },
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
-- Your setup opts here
|
symbols = { icon_source = 'lspkind' },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,14 @@ return {
|
|||||||
lsp_doc_border = true, -- add a border to hover docs and signature help
|
lsp_doc_border = true, -- add a border to hover docs and signature help
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
keys = {
|
||||||
|
{ '<leader>md', '<cmd>Noice dismiss<CR>', mode = 'n', desc = 'Noice dismiss' },
|
||||||
|
},
|
||||||
|
init = function()
|
||||||
|
vim.keymap.set('c', '<S-Enter>', function()
|
||||||
|
require('noice').redirect(vim.fn.getcmdline())
|
||||||
|
end, { desc = 'Redirect Cmdline' })
|
||||||
|
end,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'MunifTanjim/nui.nvim',
|
'MunifTanjim/nui.nvim',
|
||||||
'rcarriga/nvim-notify',
|
'rcarriga/nvim-notify',
|
||||||
|
|||||||
@@ -2,8 +2,7 @@ return {
|
|||||||
{
|
{
|
||||||
'stevearc/oil.nvim',
|
'stevearc/oil.nvim',
|
||||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||||
config = function()
|
opts = {
|
||||||
require('oil').setup {
|
|
||||||
columns = { 'icon' },
|
columns = { 'icon' },
|
||||||
keymaps = {
|
keymaps = {
|
||||||
['<C-h>'] = false,
|
['<C-h>'] = false,
|
||||||
@@ -13,8 +12,8 @@ return {
|
|||||||
view_options = {
|
view_options = {
|
||||||
show_hidden = true,
|
show_hidden = true,
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
|
init = function()
|
||||||
-- Open parent directory in current window
|
-- Open parent directory in current window
|
||||||
vim.keymap.set('n', '-', '<CMD>Oil<CR>', { desc = 'Open parent directory' })
|
vim.keymap.set('n', '-', '<CMD>Oil<CR>', { desc = 'Open parent directory' })
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user