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

@ -40,10 +40,10 @@ return require('packer').startup(function(use)
after = 'nvim-lspconfig'
}
-- tree sitter
-- tree sitter
use {
'nvim-treesitter/nvim-treesitter',
event = 'VimEnter',
event = "VimEnter",
config = function() require "plugins.treesitter" end,
run = ':TSUpdate'
}
@ -53,11 +53,11 @@ return require('packer').startup(function(use)
config = function() require('spellsitter').setup() end
}
-- completer
-- completer
use {
'ms-jpq/coq_nvim',
branch = 'coq',
after = 'nvim-lspinstall',
after = 'nvim-lspinstall',
run = ':COQdeps',
config = function() require "plugins.coq" end
}
@ -144,12 +144,12 @@ return require('packer').startup(function(use)
use {
'lewis6991/gitsigns.nvim',
requires = {'nvim-lua/plenary.nvim'},
config = function() require('gitsigns').setup() end
config = function() require "plugins.gitsigns" end
}
use {
'p00f/nvim-ts-rainbow',
after = "nvim-treesitter",
config = function() require "plugins.nvim-ts-rainbow" end
after = "nvim-treesitter",
config = function() require "plugins.nvim-ts-rainbow" end
}
use {
'winston0410/range-highlight.nvim',
@ -165,10 +165,4 @@ return require('packer').startup(function(use)
-- integrations
use {"tpope/vim-fugitive", cmd = "G"}
use {
"xuhdev/vim-latex-live-preview",
setup = function() vim.g.livepreview_previewer = 'zathura' end,
event = "FileType tex"
}
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')

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,35 +1,40 @@
local remap = vim.api.nvim_set_keymap
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
remap('i', '<esc>', [[pumvisible() ? "<c-e><esc>" : "<esc>"]], { expr = true, noremap = true })
remap('i', '<c-c>', [[pumvisible() ? "<c-e><c-c>" : "<c-c>"]], { 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 })
remap('i', '<esc>', [[pumvisible() ? "<c-e><esc>" : "<esc>"]],
{expr = true, noremap = true})
remap('i', '<c-c>', [[pumvisible() ? "<c-e><c-c>" : "<c-c>"]],
{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
_G.MUtils= {}
_G.MUtils = {}
MUtils.CR = function()
if vim.fn.pumvisible() ~= 0 then
if vim.fn.complete_info({ 'selected' }).selected ~= -1 then
return npairs.esc('<c-y>')
if vim.fn.pumvisible() ~= 0 then
if vim.fn.complete_info({'selected'}).selected ~= -1 then
return npairs.esc('<c-y>')
else
return npairs.esc('<c-e>') .. npairs.autopairs_cr()
end
else
return npairs.esc('<c-e>') .. npairs.autopairs_cr()
return npairs.autopairs_cr()
end
else
return npairs.autopairs_cr()
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()
if vim.fn.pumvisible() ~= 0 and vim.fn.complete_info({ 'mode' }).mode == 'eval' then
return npairs.esc('<c-e>') .. npairs.autopairs_bs()
else
return npairs.autopairs_bs()
end
if vim.fn.pumvisible() ~= 0 and vim.fn.complete_info({'mode'}).mode ==
'eval' then
return npairs.esc('<c-e>') .. npairs.autopairs_bs()
else
return npairs.autopairs_bs()
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

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

View File

@ -1,15 +1,13 @@
require'nvim-treesitter.configs'.setup {
ensure_installed = {"lua"}, -- one of "all", "maintained" (parsers with maintainers), or a list of languages
highlight = {
enable = true, -- false will disable the whole extension
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
use_languagetree = true
},
indent = {
enable = true
}
ensure_installed = {"lua"}, -- one of "all", "maintained" (parsers with maintainers), or a list of languages
highlight = {
enable = true, -- false will disable the whole extension
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
use_languagetree = true
},
indent = {enable = true}
}