merge: develop <--- feature/code-action
* HEAD | \ | *a46119d
<github@luxolus.com> nvim/psoxizsh: misc. tidying of init scripts | *70eb4b4
<github@luxolus.com> nvim/key: Buffer.Lsp.N.Leader.CodeAction | *9a41cb4
<github@luxolus.com> nvim/plug: +dressing@master | / | develop Signed-off-by: Bazaah <github@luxolus.com>
This commit is contained in:
commit
3fbebc60e3
|
@ -33,12 +33,12 @@ local function psoxizsh_early_config()
|
|||
|
||||
o.list = true
|
||||
o.listchars:append {
|
||||
trail = '\u{02FD}',
|
||||
extends = '\u{22B3}',
|
||||
precedes = '\u{22B2}',
|
||||
nbsp = '\u{02EC}',
|
||||
conceal = '\u{2219}',
|
||||
tab = '\u{2559}\u{254C}\u{2556}',
|
||||
trail = '\u{02FD}',
|
||||
extends = '\u{22B3}',
|
||||
precedes = '\u{22B2}',
|
||||
nbsp = '\u{02EC}',
|
||||
conceal = '\u{2219}',
|
||||
tab = '\u{2559}\u{254C}\u{2556}',
|
||||
}
|
||||
|
||||
o.ignorecase = true
|
||||
|
@ -158,9 +158,15 @@ local function psoxizsh_post_config(plugs)
|
|||
keys.Global.N.Leader.ToggleGutter { action = ToggleGutter }
|
||||
|
||||
-- Reload configuration
|
||||
keys.Global.N.Leader.ReloadConfig { action = function() plugs:reload() end }
|
||||
local function ReloadConfig()
|
||||
plugs:reload()
|
||||
vim.notify('Reloaded Config',
|
||||
vim.log.levels.INFO,
|
||||
{ title = 'Psoxizsh.Plug' }
|
||||
)
|
||||
end
|
||||
|
||||
g.one_allow_italics = 1
|
||||
keys.Global.N.Leader.ReloadConfig { action = ReloadConfig }
|
||||
|
||||
local color_highlights_override = function()
|
||||
local hl = require 'psoxizsh.util.highlight'
|
||||
|
@ -200,8 +206,8 @@ end
|
|||
|
||||
local hooks = {
|
||||
early = { 'PsoxConfigEarly', psoxizsh_early_config },
|
||||
post = { 'PsoxConfigPost', psoxizsh_post_config },
|
||||
late = { 'PsoxConfigLate', psoxizsh_late_config },
|
||||
post = { 'PsoxConfigPost', psoxizsh_post_config },
|
||||
late = { 'PsoxConfigLate', psoxizsh_late_config },
|
||||
}
|
||||
|
||||
return require('psoxizsh.plugins') { hooks = hooks }
|
||||
|
|
|
@ -134,6 +134,7 @@ M.Buffer.Lsp.N {
|
|||
RenameSymbol = B { 'Rename <cword> symbol' , key = 'rn' , action = vim.lsp.buf.rename , } ,
|
||||
FormatDocument = B { 'Format current document' , key = 'F' , action = vim.lsp.buf.formatting , } ,
|
||||
ShowSignature = B { 'Display function signature help of <cword> symbol' , key = 'K' , action = vim.lsp.buf.signature_help , } ,
|
||||
CodeAction = B { 'Request code actions for <cword>' , key = '.' , action = vim.lsp.buf.code_action , } ,
|
||||
|
||||
},
|
||||
|
||||
|
@ -145,4 +146,18 @@ M.Buffer.Lsp.N {
|
|||
ShowDocumentation = B { 'Display documentation of <cword> symbol' , key = 'K' , action = vim.lsp.buf.hover , } ,
|
||||
}
|
||||
|
||||
-- ###################################
|
||||
-- ## PLUGIN dressing.nvim Mappings ##
|
||||
-- ###################################
|
||||
M.Plugin.Dressing {
|
||||
Input = G {
|
||||
{ mode = 'i', skip = true },
|
||||
|
||||
Close = B { 'Close the input modal' , key = '<Esc>' , } ,
|
||||
Confirm = B { 'Submit the current input' , key = '<CR>' , } ,
|
||||
Prev = B { 'Previous item in input history' , key = '<Up>' , } ,
|
||||
Next = B { 'Next item in input history' , key = '<Down>' , } ,
|
||||
}
|
||||
}
|
||||
|
||||
return M
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
return function()
|
||||
local dressing, util = require 'dressing', require 'psoxizsh.util'
|
||||
local K = require('psoxizsh.key.map').Plugin.Dressing
|
||||
|
||||
local defaults = {
|
||||
input = {
|
||||
default_prompt = '<|>',
|
||||
|
||||
mappings = { i = {
|
||||
[K.Input.Close.key] = 'Close',
|
||||
[K.Input.Confirm.key] = 'Confirm',
|
||||
[K.Input.Prev.key] = 'HistoryPrev',
|
||||
[K.Input.Next.key] = 'HistoryNext',
|
||||
}},
|
||||
},
|
||||
|
||||
select = {
|
||||
backend = { 'telescope', 'builtin' }
|
||||
},
|
||||
}
|
||||
|
||||
dressing.setup(util.mconfig('config.dressing', defaults))
|
||||
end
|
|
@ -126,6 +126,13 @@ local plugins = {
|
|||
config = require 'psoxizsh.plugins.config.trouble'
|
||||
},
|
||||
|
||||
-- vim.ui.input & vim.ui.select handler
|
||||
{ 'stevearc/dressing.nvim',
|
||||
as = 'dressing',
|
||||
branch = 'master',
|
||||
config = require 'psoxizsh.plugins.config.dressing'
|
||||
},
|
||||
|
||||
-- Autocompletion + snippets + vim.diagnostic sources
|
||||
-- Completion framework
|
||||
{ 'hrsh7th/nvim-cmp',
|
||||
|
|
Loading…
Reference in New Issue