This commit is contained in:
QQ 2023-10-08 22:40:40 +08:00
parent 4cc25ed0a7
commit 10cda71a9d
2 changed files with 11 additions and 7 deletions

View File

@ -29,12 +29,12 @@ local vscodeplugs = require('vscode.plug')
local neovimplugs = require('neovim.plug') local neovimplugs = require('neovim.plug')
if G.g.vscode then if G.g.vscode then
plugs = {vscodeplugs, normalplugs} normalplugs = {vscodeplugs, normalplugs}
else else
plugs = {neovimplugs, normalplugs} normalplugs = {neovimplugs, normalplugs}
end end
require("lazy").setup(plugs) require("lazy").setup(normalplugs)
if G.g.vscode then if G.g.vscode then
require('vscode.vscode') require('vscode.vscode')

View File

@ -3,7 +3,6 @@ return {
'neoclide/coc.nvim', 'neoclide/coc.nvim',
config = function() config = function()
G.opt.backup = false G.opt.backup = false
G.opt.writebackup = false G.opt.writebackup = false
G.opt.updatetime = 300 G.opt.updatetime = 300
@ -11,7 +10,10 @@ return {
G.g.coc_global_extensions = { G.g.coc_global_extensions = {
'coc-pyright', 'coc-pyright',
'coc-java', 'coc-java',
'coc-sh',
'coc-sumneko-lua',
'coc-word',
'coc-lists', 'coc-lists',
'coc-pairs', 'coc-pairs',
'coc-marketplace', 'coc-marketplace',
@ -27,8 +29,9 @@ return {
G.map({ G.map({
{ "i", "<TAB>", 'coc#pum#visible() ? coc#pum#next(1) : v:lua.check_back_space() ? "<TAB>" : coc#refresh()', opts }, -- { "i", "<TAB>", 'coc#pum#visible() ? coc#pum#next(1) : v:lua.check_back_space() ? "<TAB>" : coc#refresh()', opts },
{ "i", "<S-TAB>", [[coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"]], opts }, -- { "i", "<S-TAB>", [[coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"]], opts },
{ "i", "<cr>", [[coc#pum#visible() ? coc#pum#confirm() : "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"]], opts }, { "i", "<cr>", [[coc#pum#visible() ? coc#pum#confirm() : "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"]], opts },
{ "n", "gd", "<Plug>(coc-definition)", {silent = true} }, { "n", "gd", "<Plug>(coc-definition)", {silent = true} },
@ -142,6 +145,7 @@ return {
-- provide custom statusline: lightline.vim, vim-airline -- provide custom statusline: lightline.vim, vim-airline
vim.opt.statusline:prepend("%{coc#status()}%{get(b:,'coc_current_function','')}") vim.opt.statusline:prepend("%{coc#status()}%{get(b:,'coc_current_function','')}")
-- Mappings for CoCList -- Mappings for CoCList
-- code actions and coc stuff -- code actions and coc stuff
---@diagnostic disable-next-line: redefined-local ---@diagnostic disable-next-line: redefined-local