Fix keymap buffer (#223)

* apply key mapping to selected buffer only

* <help> filetype should not be handled by navigator

Co-authored-by: spike <spike@w530>
mine
sp4ke 2 years ago committed by GitHub
parent de018d9ae3
commit a7886fc055
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -42,6 +42,7 @@ local disabled_ft = {
'windline',
'notify',
'nofile',
'help',
'',
}
-- local cap = vim.lsp.protocol.make_client_capabilities()

@ -216,6 +216,7 @@ local function set_mapping(lsp_attach_info)
if value.desc then
opts.desc = value.desc
end
opts.buffer = bufnr
vim.keymap.set(value.mode or 'n', value.key, value.func, opts)
if string.find(value.desc, 'range format') and value.mode == 'v' then
rfmtkey = value.key

Loading…
Cancel
Save