auto-pairs fork, fix telescope-ui-select config
This commit is contained in:
parent
f5b5d5d0ae
commit
9dbd9264e5
25
init.lua
25
init.lua
|
@ -59,7 +59,7 @@ o.tabstop = 4 -- A physical tab is 4 characters wide
|
||||||
o.shiftwidth = 4 -- A unit of indentention is 4 levels wide
|
o.shiftwidth = 4 -- A unit of indentention is 4 levels wide
|
||||||
o.wrapmargin = 0 -- Disable hard line wrapping
|
o.wrapmargin = 0 -- Disable hard line wrapping
|
||||||
o.textwidth = 0 -- Comments lines should wrap at 100 chars
|
o.textwidth = 0 -- Comments lines should wrap at 100 chars
|
||||||
o.laststatus = 3
|
o.laststatus = 3 -- Use one global status bar
|
||||||
-- Set <Leader> key
|
-- Set <Leader> key
|
||||||
g.mapleader = ' '
|
g.mapleader = ' '
|
||||||
vim.cmd 'filetype plugin indent on'
|
vim.cmd 'filetype plugin indent on'
|
||||||
|
@ -147,13 +147,17 @@ do
|
||||||
which_key.register { ['-'] = {zoom_out, "Zoom out"} }
|
which_key.register { ['-'] = {zoom_out, "Zoom out"} }
|
||||||
|
|
||||||
if workman then
|
if workman then
|
||||||
which_key.register { j = {'n', 'Next search match'} }
|
which_key.register {
|
||||||
which_key.register { k = {'e', 'End of word'} }
|
j = {'n', 'Next search match'},
|
||||||
which_key.register { n = {'gj', 'Down'} }
|
k = {'e', 'End of word'},
|
||||||
which_key.register { e = {'gk', 'Up'} }
|
n = {'gj', 'Down'},
|
||||||
|
e = {'gk', 'Up'},
|
||||||
|
}
|
||||||
else
|
else
|
||||||
which_key.register { j = {'gj', 'Down'} }
|
which_key.register {
|
||||||
which_key.register { k = {'gk', 'Up'} }
|
j = {'gj', 'Down'},
|
||||||
|
k = {'gk', 'Up'}
|
||||||
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -272,7 +276,7 @@ require'packer'.startup(function(use)
|
||||||
use 'rust-lang/rust.vim'
|
use 'rust-lang/rust.vim'
|
||||||
|
|
||||||
-- Editing --
|
-- Editing --
|
||||||
use 'jiangmiao/auto-pairs'
|
use 'LunarWatcher/auto-pairs'
|
||||||
use 'ojroques/nvim-bufdel'
|
use 'ojroques/nvim-bufdel'
|
||||||
--use 'yuttie/comfortable-motion.vim'
|
--use 'yuttie/comfortable-motion.vim'
|
||||||
use {'jbyuki/instant.nvim', config = function ()
|
use {'jbyuki/instant.nvim', config = function ()
|
||||||
|
@ -641,7 +645,7 @@ require'packer'.startup(function(use)
|
||||||
use {'nvim-telescope/telescope-project.nvim', config = function ()
|
use {'nvim-telescope/telescope-project.nvim', config = function ()
|
||||||
require'telescope'.load_extension('project')
|
require'telescope'.load_extension('project')
|
||||||
end}
|
end}
|
||||||
use {'nvim-telescope/telescope-ui-select.nvim', config = function ()
|
use {'nvim-telescope/telescope-ui-select.nvim', after = 'telescope.nvim', config = function ()
|
||||||
require'telescope'.load_extension('ui-select')
|
require'telescope'.load_extension('ui-select')
|
||||||
end}
|
end}
|
||||||
use {'nvim-telescope/telescope-dap.nvim', after = 'telescope.nvim', config = function()
|
use {'nvim-telescope/telescope-dap.nvim', after = 'telescope.nvim', config = function()
|
||||||
|
@ -708,6 +712,8 @@ vim.cmd [[
|
||||||
|
|
||||||
---- autopairs ----
|
---- autopairs ----
|
||||||
vim.g.AutoPairsMultilineClose = 0
|
vim.g.AutoPairsMultilineClose = 0
|
||||||
|
vim.g.AutoPairsMapBS = 1
|
||||||
|
vim.g.AutoPairsCompatibleMaps = 1
|
||||||
|
|
||||||
|
|
||||||
---- barbar ----
|
---- barbar ----
|
||||||
|
@ -910,6 +916,7 @@ local function on_attach(client, bufnr)
|
||||||
i = {'<Cmd>Telescope lsp_implementations<CR>', 'Implementation'},
|
i = {'<Cmd>Telescope lsp_implementations<CR>', 'Implementation'},
|
||||||
a = {vim.lsp.buf.code_action, 'Code action'},
|
a = {vim.lsp.buf.code_action, 'Code action'},
|
||||||
r = {vim.lsp.buf.rename, 'Rename'},
|
r = {vim.lsp.buf.rename, 'Rename'},
|
||||||
|
h = {function() vim.lsp.inlay_hint(0, nil) end, 'Inlay hints'},
|
||||||
l = {vim.lsp.codelens.refresh, 'Show codelenses'},
|
l = {vim.lsp.codelens.refresh, 'Show codelenses'},
|
||||||
L = {vim.lsp.codelens.run, 'Run codelens'},
|
L = {vim.lsp.codelens.run, 'Run codelens'},
|
||||||
t = {'<Cmd>Telescope lsp_type_definitions<CR>', 'Type definition'},
|
t = {'<Cmd>Telescope lsp_type_definitions<CR>', 'Type definition'},
|
||||||
|
|
Loading…
Reference in a new issue