nvim: fancy popup borders

This commit is contained in:
Daniel Lundin 2021-04-19 15:28:25 +02:00
parent 6fddacc265
commit 0e2e5288ab
6 changed files with 48 additions and 18 deletions

View file

@ -11,3 +11,13 @@ augroup recompile_plugins
autocmd!
autocmd BufWritePost plugins.lua call <SID>recompile_plugins()
augroup END
"" Temporary hacks
" Show syntax highlight group in the status bar
map ,H :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<'
\ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<"
\ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
map ,L :luafile %<CR>

View file

@ -1,8 +1,10 @@
require("lspsaga").init_lsp_saga {
use_saga_diagnostic_sign = false,
use_saga_diagnostic_sign = true,
-- error_sign = "",
-- warn_sign = "",
-- infor_sign = "",
-- hint_sign = "➤",
code_action_prompt = {enable = false}
code_action_prompt = {enable = false},
border_style = "round",
max_preview_lines = 20,
}

View file

@ -25,7 +25,7 @@ telescope.setup {
-- TODO: Reduce preview ratio
-- Override flex layout
local layout_strategies = require("telescope.pickers.layout_strategies")
--[[ local layout_strategies = require("telescope.pickers.layout_strategies")
local config = require("telescope.config")
layout_strategies.flex = function(self, max_columns, max_lines)
@ -41,7 +41,7 @@ layout_strategies.flex = function(self, max_columns, max_lines)
self.layout_config = (config.values.layout_defaults or {})["horizontal"]
return layout_strategies.horizontal(self, max_columns, max_lines)
end
end
end ]]
-- Extensions
telescope.load_extension("fzy_native")

View file

@ -60,3 +60,28 @@ map('i', '', '<C-w>')
vim.g.netrw_dirhistmax = 0
require('plugins')
-- local border = { '╭', '─' ,'╮', '│', '╯', '─', '╰', '│' }
local border = { '', '' ,'', '🮇', '', '', '', '' }
vim.lsp.handlers["textDocument/hover"] =
vim.lsp.with(
vim.lsp.handlers.hover,
{
border = border
}
)
vim.lsp.handlers["textDocument/signatureHelp"] =
vim.lsp.with(
vim.lsp.handlers.signature_help,
{
border = border
}
)
-- vim.cmd [[nnoremap <buffer><silent> <C-space> :lua vim.lsp.diagnostic.show_line_diagnostics({ border = border })<CR>]]
-- vim.cmd [[nnoremap <buffer><silent> ]g :lua vim.lsp.diagnostic.goto_next({ popup_opts = { border = border }})<CR>]]
-- vim.cmd [[nnoremap <buffer><silent> [g :lua vim.lsp.diagnostic.goto_prev({ popup_opts = { border = "round" }})<CR>]]

View file

@ -12,7 +12,7 @@ return require('packer').startup(function()
end
}
use {
--[[ use {
"glepnir/lspsaga.nvim",
config = function()
require("dln.lspsaga")
@ -29,7 +29,7 @@ return require('packer').startup(function()
map("n", "[d", ":Lspsaga diagnostic_jump_prev<CR>", o)
map("n", "]d", ":Lspsaga diagnostic_jump_next<CR>", o)
end
}
} ]]
use {
"hrsh7th/nvim-compe",

View file

@ -50,13 +50,8 @@ _G.packer_plugins = {
loaded = true,
path = "/home/dln/.local/share/nvim/site/pack/packer/start/kommentary"
},
["lspsaga.nvim"] = {
config = { "\27LJ\2\nª\4\0\0\b\0\22\00096\0\0\0'\2\1\0B\0\2\0016\0\0\0'\2\2\0B\0\2\0029\0\3\0005\1\4\0\18\2\0\0'\4\5\0'\5\6\0'\6\a\0\18\a\1\0B\2\5\1\18\2\0\0'\4\5\0'\5\b\0'\6\t\0\18\a\1\0B\2\5\1\18\2\0\0'\4\5\0'\5\n\0'\6\v\0\18\a\1\0B\2\5\1\18\2\0\0'\4\5\0'\5\f\0'\6\r\0\18\a\1\0B\2\5\1\18\2\0\0'\4\5\0'\5\14\0'\6\15\0\18\a\1\0B\2\5\1\18\2\0\0'\4\5\0'\5\16\0'\6\17\0\18\a\1\0B\2\5\1\18\2\0\0'\4\5\0'\5\18\0'\6\19\0\18\a\1\0B\2\5\1\18\2\0\0'\4\5\0'\5\20\0'\6\21\0\18\a\1\0B\2\5\1K\0\1\0&:Lspsaga diagnostic_jump_next<CR>\a]d&:Lspsaga diagnostic_jump_prev<CR>\a[d':Lspsaga show_line_diagnostics<CR>\15<leader>cd$:Lspsaga preview_definition<CR>\agd\24:Lspsaga rename<CR>\agr :Lspsaga signature_help<CR>\ags\29:Lspsaga code_action<CR>\15<leader>ca\28:Lspsaga lsp_finder<CR>\agh\6n\1\0\1\vsilent\2\bmap\14dln.utils\16dln.lspsaga\frequire\0" },
loaded = true,
path = "/home/dln/.local/share/nvim/site/pack/packer/start/lspsaga.nvim"
},
["nvim-compe"] = {
config = { "\27LJ\2\n}\0\1\6\0\a\0\22)\1\0\0\2\0\1\0X\1\17€6\1\0\0009\1\1\0019\1\2\1'\3\3\0B\1\2\2\18\3\1\0009\1\4\1\18\4\0\0\18\5\0\0B\1\4\2\18\3\1\0009\1\5\1'\4\6\0B\1\3\2X\2\3€+\1\1\0X\2\1€+\1\2\0L\1\2\0\a%s\nmatch\bsub\6.\fgetline\afn\bvimn\1\0\5\0\5\1\0223\0\0\0006\1\1\0009\1\2\0019\1\3\1'\3\4\0B\1\2\2\23\1\0\1\18\2\0\0\18\4\1\0B\2\2\2\15\0\2\0X\3\a€\18\2\0\0\23\4\0\1B\2\2\2\15\0\2\0X\3\2€+\2\2\0X\3\1€+\2\1\0002\0\0€L\2\2\0\6.\bcol\afn\bvim\0\2œ\1\0\2\5\2\5\1\0256\2\0\0009\2\1\0029\2\2\2B\2\1\2\t\2\0\0X\2\5€-\2\0\0009\2\3\2\18\4\0\0D\2\2\0X\2\r€-\2\1\0B\2\1\2\15\0\2\0X\3\5€-\2\0\0009\2\3\2\18\4\1\0D\2\2\0X\2\4€6\2\0\0009\2\1\0029\2\4\2D\2\1\0K\0\1\0\0À\1À\19compe#complete\15term_codes\15pumvisible\afn\bvim\2<>\3\1\0\a\0\22\0%6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0005\3\4\0=\3\5\2B\0\2\0016\0\0\0'\2\6\0B\0\2\0023\1\a\0006\2\b\0003\3\n\0=\3\t\0029\2\v\0'\4\f\0'\5\r\0'\6\14\0B\2\4\0019\2\v\0'\4\f\0'\5\15\0'\6\16\0B\2\4\0019\2\v\0'\4\17\0'\5\18\0'\6\19\0B\2\4\0019\2\v\0'\4\f\0'\5\20\0'\6\21\0B\2\4\0012\0\0€K\0\1\0\25compe#close('<C-e>')\n<C-e>\26compe:#confirm('<CR')\t<CR>\6x%v:lua.complete('<C-p>', '<C-h>')\f<S-Tab>%v:lua.complete('<C-n>', '<Tab>')\n<Tab>\ais\tmapx\0\rcomplete\a_G\0\14dln.utils\vsource\1\0\3\rnvim_lua\2\vbuffer\2\rnvim_lsp\2\1\0\1\15min_length\3\0\nsetup\ncompe\frequire\0" },
config = { "\27LJ\2\n}\0\1\6\0\a\0\22)\1\0\0\2\0\1\0X\1\17€6\1\0\0009\1\1\0019\1\2\1'\3\3\0B\1\2\2\18\3\1\0009\1\4\1\18\4\0\0\18\5\0\0B\1\4\2\18\3\1\0009\1\5\1'\4\6\0B\1\3\2X\2\3€+\1\1\0X\2\1€+\1\2\0L\1\2\0\a%s\nmatch\bsub\6.\fgetline\afn\bvimn\1\0\5\0\5\1\0223\0\0\0006\1\1\0009\1\2\0019\1\3\1'\3\4\0B\1\2\2\23\1\0\1\18\2\0\0\18\4\1\0B\2\2\2\15\0\2\0X\3\a€\18\2\0\0\23\4\0\1B\2\2\2\15\0\2\0X\3\2€+\2\2\0X\3\1€+\2\1\0002\0\0€L\2\2\0\6.\bcol\afn\bvim\0\2œ\1\0\2\5\2\5\1\0256\2\0\0009\2\1\0029\2\2\2B\2\1\2\t\2\0\0X\2\5€-\2\0\0009\2\3\2\18\4\0\0D\2\2\0X\2\r€-\2\1\0B\2\1\2\15\0\2\0X\3\5€-\2\0\0009\2\3\2\18\4\1\0D\2\2\0X\2\4€6\2\0\0009\2\1\0029\2\4\2D\2\1\0K\0\1\0\0À\1À\19compe#complete\15term_codes\15pumvisible\afn\bvim\2<>\3\1\0\a\0\22\0%6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0005\3\4\0=\3\5\2B\0\2\0016\0\0\0'\2\6\0B\0\2\0023\1\a\0006\2\b\0003\3\n\0=\3\t\0029\2\v\0'\4\f\0'\5\r\0'\6\14\0B\2\4\0019\2\v\0'\4\f\0'\5\15\0'\6\16\0B\2\4\0019\2\v\0'\4\17\0'\5\18\0'\6\19\0B\2\4\0019\2\v\0'\4\f\0'\5\20\0'\6\21\0B\2\4\0012\0\0€K\0\1\0\25compe#close('<C-e>')\n<C-e>\26compe:#confirm('<CR')\t<CR>\6x%v:lua.complete('<C-p>', '<C-h>')\f<S-Tab>%v:lua.complete('<C-n>', '<Tab>')\n<Tab>\ais\tmapx\0\rcomplete\a_G\0\14dln.utils\vsource\1\0\3\vbuffer\2\rnvim_lsp\2\rnvim_lua\2\1\0\1\15min_length\3\0\nsetup\ncompe\frequire\0" },
loaded = true,
path = "/home/dln/.local/share/nvim/site/pack/packer/start/nvim-compe"
},
@ -110,20 +105,18 @@ _G.packer_plugins = {
}
}
-- Config for: kommentary
try_loadstring("\27LJ\2\në\1\0\0\6\0\v\0\0226\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\0016\0\3\0009\0\4\0009\0\5\0'\2\6\0'\3\a\0'\4\b\0004\5\0\0B\0\5\0016\0\3\0009\0\4\0009\0\5\0'\2\t\0'\3\a\0'\4\n\0004\5\0\0B\0\5\1K\0\1\0$<Plug>kommentary_visual_default\6v\"<Plug>kommentary_line_default\6\31\6n\20nvim_set_keymap\bapi\bvim\26use_extended_mappings\22kommentary.config\frequire\0", "config", "kommentary")
-- Config for: telescope.nvim
try_loadstring("\27LJ\2\n\4\0\0\6\0\16\0&6\0\0\0'\2\1\0B\0\2\0016\0\0\0'\2\2\0B\0\2\0029\0\3\0\18\1\0\0'\3\4\0'\4\5\0'\5\6\0B\1\4\1\18\1\0\0'\3\4\0'\4\a\0'\5\6\0B\1\4\1\18\1\0\0'\3\4\0'\4\b\0'\5\t\0B\1\4\1\18\1\0\0'\3\4\0'\4\n\0'\5\v\0B\1\4\1\18\1\0\0'\3\4\0'\4\f\0'\5\r\0B\1\4\1\18\1\0\0'\3\4\0'\4\14\0'\5\15\0B\1\4\1K\0\1\0;<cmd>lua require(\"telescope.builtin\").treesitter()<CR>\14<leader>tE<cmd>lua require(\"telescope.builtin\").lsp_document_symbols()<CR>\14<leader>s:<cmd>lua require(\"telescope.builtin\").git_files()<CR>\14<leader>e9<cmd>lua require(\"telescope.builtin\").oldfiles()<CR>\14<leader>f\14<leader>b8<cmd>lua require(\"telescope.builtin\").buffers()<CR>\f<space>\6n\bmap\14dln.utils\18dln.telescope\frequire\0", "config", "telescope.nvim")
-- Config for: indent-blankline.nvim
try_loadstring("\27LJ\2\n<>\4\0\0\2\0\16\0!6\0\0\0009\0\1\0'\1\3\0=\1\2\0006\0\0\0009\0\1\0'\1\5\0=\1\4\0006\0\0\0009\0\1\0005\1\a\0=\1\6\0006\0\0\0009\0\1\0005\1\t\0=\1\b\0006\0\0\0009\0\1\0005\1\v\0=\1\n\0006\0\0\0009\0\1\0+\1\2\0=\1\f\0006\0\0\0009\0\1\0+\1\2\0=\1\r\0006\0\0\0009\0\1\0005\1\15\0=\1\14\0K\0\1\0\1\5\0\0\fIndent1\fIndent2\fIndent3\fIndent4)indent_blankline_char_highlight_list4indent_blankline_show_trailing_blankline_indent-indent_blankline_show_first_indent_level\1\3\0\0\ttext\rmarkdown&indent_blankline_filetype_exclude\1\3\0\0\thelp\rterminal%indent_blankline_buftype_exclude\1\2\0\0\16IndentSpace/indent_blankline_space_char_highlight_list\bâ¬<C3A2> indent_blankline_space_char\bâ”\26indent_blankline_char\6g\bvim\0", "config", "indent-blankline.nvim")
-- Config for: kommentary
try_loadstring("\27LJ\2\në\1\0\0\6\0\v\0\0226\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\0016\0\3\0009\0\4\0009\0\5\0'\2\6\0'\3\a\0'\4\b\0004\5\0\0B\0\5\0016\0\3\0009\0\4\0009\0\5\0'\2\t\0'\3\a\0'\4\n\0004\5\0\0B\0\5\1K\0\1\0$<Plug>kommentary_visual_default\6v\"<Plug>kommentary_line_default\6\31\6n\20nvim_set_keymap\bapi\bvim\26use_extended_mappings\22kommentary.config\frequire\0", "config", "kommentary")
-- Config for: nvim-compe
try_loadstring("\27LJ\2\n}\0\1\6\0\a\0\22)\1\0\0\2\0\1\0X\1\17€6\1\0\0009\1\1\0019\1\2\1'\3\3\0B\1\2\2\18\3\1\0009\1\4\1\18\4\0\0\18\5\0\0B\1\4\2\18\3\1\0009\1\5\1'\4\6\0B\1\3\2X\2\3€+\1\1\0X\2\1€+\1\2\0L\1\2\0\a%s\nmatch\bsub\6.\fgetline\afn\bvimn\1\0\5\0\5\1\0223\0\0\0006\1\1\0009\1\2\0019\1\3\1'\3\4\0B\1\2\2\23\1\0\1\18\2\0\0\18\4\1\0B\2\2\2\15\0\2\0X\3\a€\18\2\0\0\23\4\0\1B\2\2\2\15\0\2\0X\3\2€+\2\2\0X\3\1€+\2\1\0002\0\0€L\2\2\0\6.\bcol\afn\bvim\0\2œ\1\0\2\5\2\5\1\0256\2\0\0009\2\1\0029\2\2\2B\2\1\2\t\2\0\0X\2\5€-\2\0\0009\2\3\2\18\4\0\0D\2\2\0X\2\r€-\2\1\0B\2\1\2\15\0\2\0X\3\5€-\2\0\0009\2\3\2\18\4\1\0D\2\2\0X\2\4€6\2\0\0009\2\1\0029\2\4\2D\2\1\0K\0\1\0\0À\1À\19compe#complete\15term_codes\15pumvisible\afn\bvim\2<>\3\1\0\a\0\22\0%6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0005\3\4\0=\3\5\2B\0\2\0016\0\0\0'\2\6\0B\0\2\0023\1\a\0006\2\b\0003\3\n\0=\3\t\0029\2\v\0'\4\f\0'\5\r\0'\6\14\0B\2\4\0019\2\v\0'\4\f\0'\5\15\0'\6\16\0B\2\4\0019\2\v\0'\4\17\0'\5\18\0'\6\19\0B\2\4\0019\2\v\0'\4\f\0'\5\20\0'\6\21\0B\2\4\0012\0\0€K\0\1\0\25compe#close('<C-e>')\n<C-e>\26compe:#confirm('<CR')\t<CR>\6x%v:lua.complete('<C-p>', '<C-h>')\f<S-Tab>%v:lua.complete('<C-n>', '<Tab>')\n<Tab>\ais\tmapx\0\rcomplete\a_G\0\14dln.utils\vsource\1\0\3\vbuffer\2\rnvim_lsp\2\rnvim_lua\2\1\0\1\15min_length\3\0\nsetup\ncompe\frequire\0", "config", "nvim-compe")
-- Config for: nvim-treesitter
try_loadstring("\27LJ\2\n‰\1\0\0\3\0\b\0\f6\0\0\0'\2\1\0B\0\2\0016\0\2\0009\0\3\0'\1\5\0=\1\4\0006\0\2\0009\0\3\0'\1\a\0=\1\6\0K\0\1\0\31nvim_treesitter#foldexpr()\rfoldexpr\texpr\15foldmethod\awo\bvim\19dln.treesitter\frequire\0", "config", "nvim-treesitter")
-- Config for: nvim-shelman-theme
try_loadstring("\27LJ\2\nP\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\3\0B\0\2\1K\0\1\0\18shelman-light\16colorscheme\15colorbuddy\frequire\0", "config", "nvim-shelman-theme")
-- Config for: nvim-compe
try_loadstring("\27LJ\2\n}\0\1\6\0\a\0\22)\1\0\0\2\0\1\0X\1\17€6\1\0\0009\1\1\0019\1\2\1'\3\3\0B\1\2\2\18\3\1\0009\1\4\1\18\4\0\0\18\5\0\0B\1\4\2\18\3\1\0009\1\5\1'\4\6\0B\1\3\2X\2\3€+\1\1\0X\2\1€+\1\2\0L\1\2\0\a%s\nmatch\bsub\6.\fgetline\afn\bvimn\1\0\5\0\5\1\0223\0\0\0006\1\1\0009\1\2\0019\1\3\1'\3\4\0B\1\2\2\23\1\0\1\18\2\0\0\18\4\1\0B\2\2\2\15\0\2\0X\3\a€\18\2\0\0\23\4\0\1B\2\2\2\15\0\2\0X\3\2€+\2\2\0X\3\1€+\2\1\0002\0\0€L\2\2\0\6.\bcol\afn\bvim\0\2œ\1\0\2\5\2\5\1\0256\2\0\0009\2\1\0029\2\2\2B\2\1\2\t\2\0\0X\2\5€-\2\0\0009\2\3\2\18\4\0\0D\2\2\0X\2\r€-\2\1\0B\2\1\2\15\0\2\0X\3\5€-\2\0\0009\2\3\2\18\4\1\0D\2\2\0X\2\4€6\2\0\0009\2\1\0029\2\4\2D\2\1\0K\0\1\0\0À\1À\19compe#complete\15term_codes\15pumvisible\afn\bvim\2<>\3\1\0\a\0\22\0%6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0005\3\4\0=\3\5\2B\0\2\0016\0\0\0'\2\6\0B\0\2\0023\1\a\0006\2\b\0003\3\n\0=\3\t\0029\2\v\0'\4\f\0'\5\r\0'\6\14\0B\2\4\0019\2\v\0'\4\f\0'\5\15\0'\6\16\0B\2\4\0019\2\v\0'\4\17\0'\5\18\0'\6\19\0B\2\4\0019\2\v\0'\4\f\0'\5\20\0'\6\21\0B\2\4\0012\0\0€K\0\1\0\25compe#close('<C-e>')\n<C-e>\26compe:#confirm('<CR')\t<CR>\6x%v:lua.complete('<C-p>', '<C-h>')\f<S-Tab>%v:lua.complete('<C-n>', '<Tab>')\n<Tab>\ais\tmapx\0\rcomplete\a_G\0\14dln.utils\vsource\1\0\3\rnvim_lua\2\vbuffer\2\rnvim_lsp\2\1\0\1\15min_length\3\0\nsetup\ncompe\frequire\0", "config", "nvim-compe")
-- Config for: lspsaga.nvim
try_loadstring("\27LJ\2\nª\4\0\0\b\0\22\00096\0\0\0'\2\1\0B\0\2\0016\0\0\0'\2\2\0B\0\2\0029\0\3\0005\1\4\0\18\2\0\0'\4\5\0'\5\6\0'\6\a\0\18\a\1\0B\2\5\1\18\2\0\0'\4\5\0'\5\b\0'\6\t\0\18\a\1\0B\2\5\1\18\2\0\0'\4\5\0'\5\n\0'\6\v\0\18\a\1\0B\2\5\1\18\2\0\0'\4\5\0'\5\f\0'\6\r\0\18\a\1\0B\2\5\1\18\2\0\0'\4\5\0'\5\14\0'\6\15\0\18\a\1\0B\2\5\1\18\2\0\0'\4\5\0'\5\16\0'\6\17\0\18\a\1\0B\2\5\1\18\2\0\0'\4\5\0'\5\18\0'\6\19\0\18\a\1\0B\2\5\1\18\2\0\0'\4\5\0'\5\20\0'\6\21\0\18\a\1\0B\2\5\1K\0\1\0&:Lspsaga diagnostic_jump_next<CR>\a]d&:Lspsaga diagnostic_jump_prev<CR>\a[d':Lspsaga show_line_diagnostics<CR>\15<leader>cd$:Lspsaga preview_definition<CR>\agd\24:Lspsaga rename<CR>\agr :Lspsaga signature_help<CR>\ags\29:Lspsaga code_action<CR>\15<leader>ca\28:Lspsaga lsp_finder<CR>\agh\6n\1\0\1\vsilent\2\bmap\14dln.utils\16dln.lspsaga\frequire\0", "config", "lspsaga.nvim")
-- Config for: nvim-lspconfig
try_loadstring("\27LJ\2\n‡\4\0\0\6\0\20\0+6\0\0\0'\2\1\0B\0\2\0016\0\0\0'\2\2\0B\0\2\0029\0\3\0\18\1\0\0'\3\4\0'\4\5\0'\5\6\0B\1\4\1\18\1\0\0'\3\a\0'\4\b\0'\5\t\0B\1\4\1\18\1\0\0'\3\4\0'\4\n\0'\5\v\0B\1\4\1\18\1\0\0'\3\4\0'\4\f\0'\5\r\0B\1\4\1\18\1\0\0'\3\4\0'\4\14\0'\5\15\0B\1\4\1\18\1\0\0'\3\4\0'\4\16\0'\5\17\0B\1\4\1\18\1\0\0'\3\4\0'\4\18\0'\5\19\0B\1\4\1K\0\1\0*<Cmd>lua vim.lsp.buf.formatting()<CR>\agf/<Cmd>lua vim.lsp.buf.document_symbol()<CR>\ag0*<Cmd>lua vim.lsp.buf.references()<CR>\agr/<Cmd>lua vim.lsp.buf.type_definition()<CR>\b1gd*<Cmd>lua vim.lsp.buf.definition()<CR>\agd.<Cmd>lua vim.lsp.buf.signature_help()<CR>\n<C-k>\6i%<Cmd>lua vim.lsp.buf.hover()<CR>\6K\6n\bmap\14dln.utils\19dln.lsp-config\frequire\0", "config", "nvim-lspconfig")
END