various color change, remove dap

This commit is contained in:
juan 2021-10-25 12:10:08 +08:00
parent b9f4d3efda
commit 223357b591
Signed by: juan
GPG Key ID: 5C1E5093C74F1DC7
7 changed files with 97 additions and 90 deletions

View File

@ -43,7 +43,7 @@ return require('packer').startup(function(use)
-- tree sitter -- tree sitter
use { use {
'nvim-treesitter/nvim-treesitter', 'nvim-treesitter/nvim-treesitter',
event = 'VimEnter', event = "VimEnter",
config = function() require "plugins.treesitter" end, config = function() require "plugins.treesitter" end,
run = ':TSUpdate' run = ':TSUpdate'
} }
@ -144,7 +144,7 @@ return require('packer').startup(function(use)
use { use {
'lewis6991/gitsigns.nvim', 'lewis6991/gitsigns.nvim',
requires = {'nvim-lua/plenary.nvim'}, requires = {'nvim-lua/plenary.nvim'},
config = function() require('gitsigns').setup() end config = function() require "plugins.gitsigns" end
} }
use { use {
'p00f/nvim-ts-rainbow', 'p00f/nvim-ts-rainbow',
@ -165,10 +165,4 @@ return require('packer').startup(function(use)
-- integrations -- integrations
use {"tpope/vim-fugitive", cmd = "G"} use {"tpope/vim-fugitive", cmd = "G"}
use {
"xuhdev/vim-latex-live-preview",
setup = function() vim.g.livepreview_previewer = 'zathura' end,
event = "FileType tex"
}
end) end)

View File

@ -1,2 +1,7 @@
vim.g.coq_settings = { keymap = { recommended = false }, auto_start = true, clients= {tabnine = { enabled = true}} } vim.g.coq_settings = {
keymap = {recommended = false, pre_select = true},
auto_start = true,
clients = {tabnine = {enabled = true}},
display = {ghost_text = {enabled = false}, icons = {mode = "none"}}
}
vim.cmd('COQnow -s') vim.cmd('COQnow -s')

View File

@ -1,36 +0,0 @@
require("dapui").setup({
icons = {expanded = "", collapsed = ""},
mappings = {
-- Use a table to apply multiple mappings
expand = {"<CR>", "<2-LeftMouse>"},
open = "o",
remove = "d",
edit = "e",
repl = "r"
},
sidebar = {
-- You can change the order of elements in the sidebar
elements = {
-- Provide as ID strings or tables with "id" and "size" keys
{
id = "scopes",
size = 0.25 -- Can be float or integer > 1
}, {id = "breakpoints", size = 0.25}, {id = "stacks", size = 0.25},
{id = "watches", size = 00.25}
},
size = 40,
position = "right" -- Can be "left", "right", "top", "bottom"
},
tray = {
elements = {"repl"},
size = 10,
position = "bottom" -- Can be "left", "right", "top", "bottom"
},
floating = {
max_height = nil, -- These can be integers or a float between 0 and 1.
max_width = nil, -- Floats will be treated as percentage of your screen.
mappings = {close = {"q", "<Esc>"}}
},
windows = {indent = 1}
})

41
lua/plugins/gitsigns.lua Normal file
View File

@ -0,0 +1,41 @@
require('gitsigns').setup {
keymaps = {
-- Default keymap options
buffer = true,
noremap = true,
["n ]c"] = {
expr = true,
"&diff ? ']c' : '<cmd>lua require\"gitsigns\".next_hunk()<CR>'"
},
["n [c"] = {
expr = true,
"&diff ? '[c' : '<cmd>lua require\"gitsigns\".prev_hunk()<CR>'"
},
["n <leader>hs"] = '<cmd>lua require"gitsigns".stage_hunk()<CR>',
["n <leader>hu"] = '<cmd>lua require"gitsigns".undo_stage_hunk()<CR>',
["n <leader>hr"] = '<cmd>lua require"gitsigns".reset_hunk()<CR>',
["n <leader>hp"] = '<cmd>lua require"gitsigns".preview_hunk()<CR>',
["n <leader>hb"] = '<cmd>lua require"gitsigns".blame_line()<CR>'
},
numhl = false,
sign_priority = 5,
signs = {
add = {hl = "DiffAdd", text = "", numhl = "GitSignsAddNr"},
change = {hl = "DiffChange", text = "", numhl = "GitSignsChangeNr"},
changedelete = {
hl = "DiffChange",
text = "~",
numhl = "GitSignsChangeNr"
},
delete = {hl = "DiffDelete", text = "_", numhl = "GitSignsDeleteNr"},
topdelete = {
hl = "DiffDelete",
text = "",
numhl = "GitSignsDeleteNr"
}
},
status_formatter = nil, -- Use default
watch_gitdir = {interval = 100}
}

View File

@ -1,20 +1,24 @@
local remap = vim.api.nvim_set_keymap local remap = vim.api.nvim_set_keymap
local npairs = require('nvim-autopairs') local npairs = require('nvim-autopairs')
npairs.setup({ map_bs = false }) npairs.setup({map_bs = false})
-- these mappings are coq recommended mappings unrelated to nvim-autopairs -- these mappings are coq recommended mappings unrelated to nvim-autopairs
remap('i', '<esc>', [[pumvisible() ? "<c-e><esc>" : "<esc>"]], { expr = true, noremap = true }) remap('i', '<esc>', [[pumvisible() ? "<c-e><esc>" : "<esc>"]],
remap('i', '<c-c>', [[pumvisible() ? "<c-e><c-c>" : "<c-c>"]], { expr = true, noremap = true }) {expr = true, noremap = true})
remap('i', '<tab>', [[pumvisible() ? "<c-n>" : "<tab>"]], { expr = true, noremap = true }) remap('i', '<c-c>', [[pumvisible() ? "<c-e><c-c>" : "<c-c>"]],
remap('i', '<s-tab>', [[pumvisible() ? "<c-p>" : "<bs>"]], { expr = true, noremap = true }) {expr = true, noremap = true})
remap('i', '<tab>', [[pumvisible() ? "<c-n>" : "<tab>"]],
{expr = true, noremap = true})
remap('i', '<s-tab>', [[pumvisible() ? "<c-p>" : "<bs>"]],
{expr = true, noremap = true})
-- skip it, if you use another global object -- skip it, if you use another global object
_G.MUtils= {} _G.MUtils = {}
MUtils.CR = function() MUtils.CR = function()
if vim.fn.pumvisible() ~= 0 then if vim.fn.pumvisible() ~= 0 then
if vim.fn.complete_info({ 'selected' }).selected ~= -1 then if vim.fn.complete_info({'selected'}).selected ~= -1 then
return npairs.esc('<c-y>') return npairs.esc('<c-y>')
else else
return npairs.esc('<c-e>') .. npairs.autopairs_cr() return npairs.esc('<c-e>') .. npairs.autopairs_cr()
@ -23,13 +27,14 @@ MUtils.CR = function()
return npairs.autopairs_cr() return npairs.autopairs_cr()
end end
end end
remap('i', '<cr>', 'v:lua.MUtils.CR()', { expr = true, noremap = true }) remap('i', '<cr>', 'v:lua.MUtils.CR()', {expr = true, noremap = true})
MUtils.BS = function() MUtils.BS = function()
if vim.fn.pumvisible() ~= 0 and vim.fn.complete_info({ 'mode' }).mode == 'eval' then if vim.fn.pumvisible() ~= 0 and vim.fn.complete_info({'mode'}).mode ==
'eval' then
return npairs.esc('<c-e>') .. npairs.autopairs_bs() return npairs.esc('<c-e>') .. npairs.autopairs_bs()
else else
return npairs.autopairs_bs() return npairs.autopairs_bs()
end end
end end
remap('i', '<bs>', 'v:lua.MUtils.BS()', { expr = true, noremap = true }) remap('i', '<bs>', 'v:lua.MUtils.BS()', {expr = true, noremap = true})

View File

@ -2,8 +2,8 @@ require'nvim-treesitter.configs'.setup {
rainbow = { rainbow = {
enable = true, enable = true,
extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean
max_file_lines = nil, -- Do not enable for files with more than n lines, int max_file_lines = 4096, -- Do not enable for files with more than n lines, int
-- colors = {}, -- table of hex strings colors = { "#84a0c6", "#a093c7", "#89b8c2"}, -- table of hex strings
-- termcolors = {} -- table of colour name strings -- termcolors = {} -- table of colour name strings
} }
} }

View File

@ -9,7 +9,5 @@ require'nvim-treesitter.configs'.setup {
additional_vim_regex_highlighting = false, additional_vim_regex_highlighting = false,
use_languagetree = true use_languagetree = true
}, },
indent = { indent = {enable = true}
enable = true
}
} }