增加outline快捷键
This commit is contained in:
parent
2d33296bf7
commit
24dc738d09
@ -2,5 +2,8 @@
|
|||||||
|
|
||||||
"snippets.ultisnips.pythonPrompt": false,
|
"snippets.ultisnips.pythonPrompt": false,
|
||||||
"explorer.icon.enableNerdfont": true,
|
"explorer.icon.enableNerdfont": true,
|
||||||
"explorer.toggle": true
|
"explorer.toggle": true,
|
||||||
|
"outline.autoWidth": true,
|
||||||
|
"outline.autoPreview": true,
|
||||||
|
"outline.togglePreviewKey": "p"
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
vim.g['coc_global_extensions'] = {
|
local G = require('G')
|
||||||
|
|
||||||
|
G.g['coc_global_extensions'] = {
|
||||||
"coc-clangd",
|
"coc-clangd",
|
||||||
"coc-python",
|
"coc-python",
|
||||||
"coc-json",
|
"coc-json",
|
||||||
"coc-lua",
|
"coc-lua",
|
||||||
"coc-webview",
|
|
||||||
|
|
||||||
"coc-translator",
|
"coc-translator",
|
||||||
"coc-yank",
|
"coc-yank",
|
||||||
@ -14,17 +15,17 @@ vim.g['coc_global_extensions'] = {
|
|||||||
|
|
||||||
-- Having longer updatetime (default is 4000 ms = 4s) leads to noticeable
|
-- Having longer updatetime (default is 4000 ms = 4s) leads to noticeable
|
||||||
-- delays and poor user experience
|
-- delays and poor user experience
|
||||||
vim.opt.updatetime = 300
|
G.opt.updatetime = 300
|
||||||
|
|
||||||
-- Always show the signcolumn, otherwise it would shift the text each time
|
-- Always show the signcolumn, otherwise it would shift the text each time
|
||||||
-- diagnostics appeared/became resolved
|
-- diagnostics appeared/became resolved
|
||||||
vim.opt.signcolumn = "yes"
|
G.opt.signcolumn = "yes"
|
||||||
|
|
||||||
local keyset = vim.keymap.set
|
local keyset = vim.keymap.set
|
||||||
-- Autocomplete
|
-- Autocomplete
|
||||||
function _G.check_back_leader()
|
function _G.check_back_leader()
|
||||||
local col = vim.fn.col('.') - 1
|
local col = G.fn.col('.') - 1
|
||||||
return col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') ~= nil
|
return col == 0 or G.fn.getline('.'):sub(col, col):match('%s') ~= nil
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Use Tab for trigger completion with characters ahead and navigate
|
-- Use Tab for trigger completion with characters ahead and navigate
|
||||||
@ -81,3 +82,6 @@ keyset("v", "<leader>tt", "<Plug>(coc-translator-pv)")
|
|||||||
-- translator-releader
|
-- translator-releader
|
||||||
keyset("n", "<leader>tr", "<Plug>(coc-translator-r)")
|
keyset("n", "<leader>tr", "<Plug>(coc-translator-r)")
|
||||||
keyset("v", "<leader>tr", "<Plug>(coc-translator-rv)")
|
keyset("v", "<leader>tr", "<Plug>(coc-translator-rv)")
|
||||||
|
|
||||||
|
|
||||||
|
keyset("n", "<leader>ol", ":CocOutline<CR>")
|
||||||
|
Loading…
Reference in New Issue
Block a user