add legendary.nvim descriptions to most common bindings
This commit is contained in:
parent
427d9aa7a4
commit
77ea86bc30
8
after/plugin/lspsignature-theme.lua
Normal file
8
after/plugin/lspsignature-theme.lua
Normal file
@ -0,0 +1,8 @@
|
||||
if vim.g.colors_name == "srcery" then
|
||||
local hard_black = vim.api.nvim_get_hl_by_name("SrceryHardBlack", true).foreground
|
||||
local bright_white = vim.api.nvim_get_hl_by_name("SrceryBrightWhite", true).foreground
|
||||
|
||||
vim.api.nvim_set_hl(0, "FloatBorder", {bg=hard_black, fg=bright_white})
|
||||
vim.api.nvim_set_hl(0, "FloatNormal", {bg=hard_black, fg=bright_white})
|
||||
vim.api.nvim_set_hl(0, "Pmenu", {bg=hard_black, fg=bright_white})
|
||||
end
|
@ -6,5 +6,9 @@ return {
|
||||
vim.api.nvim_create_user_command("BaleiaColorize", function()
|
||||
baleia.once(vim.api.nvim_get_current_buf())
|
||||
end, { })
|
||||
|
||||
require("legendary").command{
|
||||
":BaleiaColorize", description = "Colorize ANSI codes"
|
||||
}
|
||||
end
|
||||
}
|
||||
|
@ -5,5 +5,11 @@ return {
|
||||
based.setup{}
|
||||
|
||||
vim.keymap.set({"n", "v"}, "<C-b>", based.convert)
|
||||
|
||||
require("legendary").keymap{
|
||||
"<C-b>",
|
||||
{ n = based.convert, v = based.convert },
|
||||
description = "Convert number to other base"
|
||||
}
|
||||
end
|
||||
}
|
||||
|
@ -1,6 +1,4 @@
|
||||
return {
|
||||
'kyazdani42/nvim-web-devicons',
|
||||
config = function()
|
||||
require('nvim-web-devicons').setup()
|
||||
end
|
||||
config = function() require('nvim-web-devicons').setup() end
|
||||
}
|
||||
|
9
lua/config/diffview.lua
Normal file
9
lua/config/diffview.lua
Normal file
@ -0,0 +1,9 @@
|
||||
return {
|
||||
"sindrets/diffview.nvim",
|
||||
requires = 'nvim-lua/plenary.nvim',
|
||||
config = function()
|
||||
require("legendary").command{
|
||||
":DiffviewOpen", description = "Open diff view"
|
||||
}
|
||||
end
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
return {
|
||||
'stevearc/dressing.nvim',
|
||||
"stevearc/dressing.nvim",
|
||||
requires = "nvim-telescope/telescope.nvim",
|
||||
config = function()
|
||||
require('dressing').setup({
|
||||
select = {
|
||||
|
@ -1,6 +1,9 @@
|
||||
return {
|
||||
'tpope/vim-fugitive',
|
||||
config = function ()
|
||||
vim.keymap.set('n', '<leader>gg', ':G<cr>', { silent = true })
|
||||
-- TODO: Add most commonly used fugitive bindings
|
||||
require("legendary").keymaps{
|
||||
{"<leader>gg", ":G<cr>", description = "Open fugitive", opts = {silent = true}}
|
||||
}
|
||||
end
|
||||
}
|
||||
|
@ -1,13 +1,22 @@
|
||||
return {
|
||||
'f-person/git-blame.nvim',
|
||||
config = function ()
|
||||
local map = require 'utils.map'
|
||||
local silent = {silent = true}
|
||||
|
||||
map('n', '<leader>gm', ":GitBlameCopySHA<CR>", silent)
|
||||
map('n', '<leader>gj', ":GitBlameOpenCommitURL<CR>", silent)
|
||||
map('n', '<leader>gu', ":GitBlameToggle<CR>", silent)
|
||||
require("legendary").keymaps{
|
||||
{
|
||||
itemgroup = "gitblame",
|
||||
description = "Git blame",
|
||||
icon = "",
|
||||
keymaps = {
|
||||
{"<leader>gm", ":GitBlameCopySHA<CR>", description = "Copy commit hash", opts = silent},
|
||||
{"<leader>gj", ":GitBlameOpenCommit<CR>", description = "Open commit", opts = silent},
|
||||
{"<leader>gu", ":GitBlameToggle<CR>", description = "Toggle git blame", opts = silent},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
vim.g["gitblame_enabled"] = 0
|
||||
vim.g["gitblame_date_format"] = "%r"
|
||||
end
|
||||
}
|
||||
|
@ -6,33 +6,36 @@ return {
|
||||
|
||||
gitsigns.setup{
|
||||
on_attach = function(bufnr)
|
||||
local function map(mode, lhs, rhs, opts)
|
||||
opts = vim.tbl_extend('force', {noremap = true, silent = true}, opts or {})
|
||||
vim.api.nvim_buf_set_keymap(bufnr, mode, lhs, rhs, opts)
|
||||
local function keymap_n(key, command, description, opts)
|
||||
opts = vim.tbl_extend('force', {noremap = true, silent = true, buffer=bufnr}, opts or {})
|
||||
return {key, command, description=description, opts=opts}
|
||||
end
|
||||
local function keymap_vn(key, command, description, opts)
|
||||
opts = vim.tbl_extend('force', {noremap = true, silent = true, buffer=bufnr}, opts or {})
|
||||
return {key, command, mode={"v", "n"}, description=description, opts=opts}
|
||||
end
|
||||
|
||||
-- Navigation
|
||||
map('n', ']c', "&diff ? ']c' : '<cmd>Gitsigns next_hunk<CR>'", {expr=true})
|
||||
map('n', '[c', "&diff ? '[c' : '<cmd>Gitsigns prev_hunk<CR>'", {expr=true})
|
||||
require("legendary").keymaps{
|
||||
{
|
||||
itemgroup = "githunks",
|
||||
description = "Git hunks",
|
||||
icon = "",
|
||||
keymaps = {
|
||||
keymap_n(']c', "&diff ? ']c' : '<cmd>Gitsigns next_hunk<CR>'", "Jump to next hunk", {expr=true}),
|
||||
keymap_n('[c', "&diff ? '[c' : '<cmd>Gitsigns prev_hunk<CR>'", "Jump to prev hunk", {expr=true}),
|
||||
|
||||
-- Actions
|
||||
map('n', '<leader>hs', ':Gitsigns stage_hunk<CR>')
|
||||
map('v', '<leader>hs', ':Gitsigns stage_hunk<CR>')
|
||||
map('n', '<leader>hr', ':Gitsigns reset_hunk<CR>')
|
||||
map('v', '<leader>hr', ':Gitsigns reset_hunk<CR>')
|
||||
map('n', '<leader>hS', '<cmd>Gitsigns stage_buffer<CR>')
|
||||
map('n', '<leader>hu', '<cmd>Gitsigns undo_stage_hunk<CR>')
|
||||
map('n', '<leader>hR', '<cmd>Gitsigns reset_buffer<CR>')
|
||||
map('n', '<leader>hp', '<cmd>Gitsigns preview_hunk<CR>')
|
||||
map('n', '<leader>hb', '<cmd>lua require"gitsigns".blame_line{full=true}<CR>')
|
||||
map('n', '<leader>tb', '<cmd>Gitsigns toggle_current_line_blame<CR>')
|
||||
map('n', '<leader>hd', '<cmd>Gitsigns diffthis<CR>')
|
||||
map('n', '<leader>hD', '<cmd>lua require"gitsigns".diffthis("~")<CR>')
|
||||
map('n', '<leader>td', '<cmd>Gitsigns toggle_deleted<CR>')
|
||||
keymap_vn("<leader>hs", ":Gitsigns stage_hunk<CR>", "Stage hunk"),
|
||||
keymap_vn("<leader>hr", ":Gitsigns reset_hunk<CR>", "Reset hunk"),
|
||||
keymap_n("<leader>hS", "<cmd>Gitsigns stage_buffer<CR>", "Stage buffer"),
|
||||
keymap_n("<leader>hu", "<cmd>Gitsigns undo_stage_hunk<CR>", "Undo stage hunk"),
|
||||
keymap_n("<leader>hR", "<cmd>Gitsigns reset_buffer<CR>", "Reset buffer"),
|
||||
keymap_n("<leader>hp", "<cmd>Gitsigns preview_hunk<CR>", "Preview hunk"),
|
||||
keymap_n('<leader>td', '<cmd>Gitsigns toggle_deleted<CR>', "Toggle deleted"),
|
||||
|
||||
-- Text object
|
||||
map('o', 'ih', ':<C-U>Gitsigns select_hunk<CR>')
|
||||
map('x', 'ih', ':<C-U>Gitsigns select_hunk<CR>')
|
||||
{'ih', {o=':<C-U>Gitsigns select_hunk<CR>', x=':<C-U>Gitsigns select_hunk<CR>'}, description="Select hunk" }
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
end
|
||||
|
@ -2,7 +2,11 @@ return {
|
||||
'ggandor/leap.nvim',
|
||||
config = function()
|
||||
local silent = {silent=true}
|
||||
vim.keymap.set("n", "s", "<Plug>(leap-forward-to)", silent)
|
||||
vim.keymap.set("n", "S", "<Plug>(leap-backward-to)", silent)
|
||||
|
||||
require("legendary").keymaps{
|
||||
{"s", "<Plug>(leap-forward-to)", description="Leap forward", opts=silent},
|
||||
{"S", "<Plug>(leap-backward-to)", description="Leap backward", opts=silent}
|
||||
}
|
||||
|
||||
end
|
||||
}
|
||||
|
@ -1,12 +1,11 @@
|
||||
return {
|
||||
'mrjones2014/legendary.nvim',
|
||||
requires = 'stevearc/dressing.nvim',
|
||||
config = function()
|
||||
vim.keymap.set("n", "<leader>l", ":Legendary<cr>", {silent = true})
|
||||
|
||||
require("legendary").setup{
|
||||
include_legendary_cmds = false,
|
||||
commands = {
|
||||
{ ":TodoTelescope", description = "Show TODO's in telescope" }
|
||||
keymaps = {
|
||||
{"<leader>l", ":Legendary<cr>", description = "Open this help menu"}
|
||||
}
|
||||
}
|
||||
end
|
||||
|
@ -87,20 +87,31 @@ end
|
||||
---@diagnostic disable-next-line: unused-local
|
||||
function M.on_attach(client, bufnr)
|
||||
-- Mappings.
|
||||
local opts = { noremap = true, silent = true }
|
||||
local opts = { noremap = true, silent = true, buffer = bufnr}
|
||||
|
||||
local function buf_set_keymap(mode, lhs, rhs) vim.api.nvim_buf_set_keymap(bufnr, mode, lhs, rhs, opts) end
|
||||
-- local function keymap(mode, lhs, rhs) vim.api.nvim_buf_set_keymap(bufnr, mode, lhs, rhs, opts) end
|
||||
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
|
||||
|
||||
require("legendary").keymaps{
|
||||
{
|
||||
itemgroup = "lsp",
|
||||
description = "LSP",
|
||||
keymaps = {
|
||||
{'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', description = "Jump to definition", opts=opts},
|
||||
{'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', description = "Jump to declaration", opts=opts},
|
||||
{'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', description = "Jump to implementation", opts=opts},
|
||||
{'K', '<cmd>lua vim.lsp.buf.hover()<CR>', description = "Show info", opts=opts},
|
||||
{'<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', description = "Rename symbol"},
|
||||
{'<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', description = "Show code actions"},
|
||||
{'<space>d', '<cmd>lua vim.diagnostic.open_float()<CR>', description = "Open float"}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||
buf_set_keymap('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>')
|
||||
buf_set_keymap('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>')
|
||||
buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>')
|
||||
buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>')
|
||||
buf_set_keymap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>')
|
||||
|
||||
-- Conflicts with movement between panes
|
||||
-- buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>')
|
||||
@ -109,9 +120,6 @@ function M.on_attach(client, bufnr)
|
||||
-- buf_set_keymap('n', '<space>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>')
|
||||
-- buf_set_keymap('n', '<space>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>')
|
||||
-- buf_set_keymap('n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>')
|
||||
buf_set_keymap('n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>')
|
||||
buf_set_keymap('n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>')
|
||||
buf_set_keymap('n', '<space>d', '<cmd>lua vim.diagnostic.open_float()<CR>')
|
||||
-- buf_set_keymap('n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>')
|
||||
-- buf_set_keymap('n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>')
|
||||
-- buf_set_keymap('n', '<space>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>')
|
||||
|
@ -1,9 +1,18 @@
|
||||
return {
|
||||
"ray-x/lsp_signature.nvim",
|
||||
config = function()
|
||||
require "lsp_signature".setup{
|
||||
local lsp_signature = require("lsp_signature")
|
||||
|
||||
lsp_signature.setup{
|
||||
hint_enable = false,
|
||||
toggle_key = '<C-x>'
|
||||
toggle_key = nil,
|
||||
handler_opts = {
|
||||
border = { " ", " ", " ", " ", " ", " ", " ", " " }
|
||||
}
|
||||
}
|
||||
|
||||
require("legendary").keymap{
|
||||
"<C-x>", lsp_signature.toggle_float_win, description="Toggle signature float"
|
||||
}
|
||||
end
|
||||
}
|
||||
|
@ -8,3 +8,8 @@ vim.api.nvim_create_autocmd("FileType", {
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
require("legendary").commands{
|
||||
{ ":Luapad", description = "Open interactive lua" },
|
||||
{ ":LuaRun", description = "Run lua from current buffer" }
|
||||
}
|
||||
|
@ -2,16 +2,10 @@ return {
|
||||
'fedepujol/move.nvim',
|
||||
config = function()
|
||||
local opts = { noremap = true, silent = true }
|
||||
-- Normal-mode commands
|
||||
-- vim.keymap.set('n', '<A-j>', ':MoveLine(1)<CR>', opts)
|
||||
-- vim.keymap.set('n', '<A-k>', ':MoveLine(-1)<CR>', opts)
|
||||
-- vim.keymap.set('n', '<A-h>', ':MoveHChar(-1)<CR>', opts)
|
||||
-- vim.keymap.set('n', '<A-l>', ':MoveHChar(1)<CR>', opts)
|
||||
|
||||
-- Visual-mode commands
|
||||
vim.keymap.set('v', '<S-j>', ':MoveBlock(1)<CR>', opts)
|
||||
vim.keymap.set('v', '<S-k>', ':MoveBlock(-1)<CR>', opts)
|
||||
vim.keymap.set('v', '<S-h>', ':MoveHBlock(-1)<CR>', opts)
|
||||
vim.keymap.set('v', '<S-l>', ':MoveHBlock(1)<CR>', opts)
|
||||
require("legendary").keymaps{
|
||||
{mode='v', '<S-j>', ':MoveBlock(1)<CR>', description = "Move block up", opts=opts},
|
||||
{mode='v', '<S-k>', ':MoveBlock(-1)<CR>', description = "Move block down", opts=opts},
|
||||
}
|
||||
end
|
||||
}
|
||||
|
@ -11,7 +11,9 @@ return {
|
||||
},
|
||||
}
|
||||
|
||||
vim.keymap.set("n", "<leader>e", ":NvimTreeToggle<CR>", {silent = true})
|
||||
vim.keymap.set("n", "<leader>f", ":NvimTreeFindFileToggle<CR>", {silent = true})
|
||||
require("legendary").keymaps{
|
||||
{"<leader>e", ":NvimTreeToggle<CR>", description = "Toggle file tree", {silent = true}},
|
||||
{"<leader>f", ":NvimTreeFindFileToggle<CR>", description = "Show file in tree", {silent = true}}
|
||||
}
|
||||
end
|
||||
}
|
||||
|
@ -1,12 +1,9 @@
|
||||
return {
|
||||
'unblevable/quick-scope',
|
||||
config = function ()
|
||||
local g = vim.g
|
||||
local cmd = vim.cmd
|
||||
|
||||
-- Trigger a highlight in the appropriate direction when pressing these keys:
|
||||
g['qs_highlight_on_keys'] = {'f', 'F', 't', 'T'}
|
||||
vim.g['qs_highlight_on_keys'] = {'f', 'F', 't', 'T'}
|
||||
|
||||
g['qs_max_chars'] = 150
|
||||
vim.g['qs_max_chars'] = 150
|
||||
end
|
||||
}
|
||||
|
@ -1,39 +0,0 @@
|
||||
local refactoring = require("refactoring")
|
||||
refactoring.setup()
|
||||
|
||||
-- telescope refactoring helper
|
||||
local function refactor(prompt_bufnr)
|
||||
local content = require("telescope.actions.state").get_selected_entry(
|
||||
prompt_bufnr
|
||||
)
|
||||
require("telescope.actions").close(prompt_bufnr)
|
||||
require("refactoring").refactor(content.value)
|
||||
end
|
||||
|
||||
-- NOTE: M is a global object
|
||||
-- for the sake of simplicity in this example
|
||||
-- you can extract this function and the helper above
|
||||
-- and then require the file and call the extracted function
|
||||
-- in the mappings below
|
||||
M = {}
|
||||
M.refactors = function()
|
||||
local opts = require("telescope.themes").get_cursor() -- set personal telescope options
|
||||
require("telescope.pickers").new(opts, {
|
||||
prompt_title = "refactors",
|
||||
finder = require("telescope.finders").new_table({
|
||||
results = require("refactoring").get_refactors(),
|
||||
}),
|
||||
sorter = require("telescope.config").values.generic_sorter(opts),
|
||||
attach_mappings = function(_, map)
|
||||
map("i", "<CR>", refactor)
|
||||
map("n", "<CR>", refactor)
|
||||
return true
|
||||
end
|
||||
}):find()
|
||||
end
|
||||
|
||||
vim.api.nvim_set_keymap("v", "<Leader>re", [[ <Esc><Cmd>lua require('refactoring').refactor('Extract Function')<CR>]], {noremap = true, silent = true, expr = false})
|
||||
vim.api.nvim_set_keymap("v", "<Leader>rf", [[ <Esc><Cmd>lua require('refactoring').refactor('Extract Function To File')<CR>]], {noremap = true, silent = true, expr = false})
|
||||
vim.api.nvim_set_keymap("v", "<Leader>rt", [[ <Esc><Cmd>lua M.refactors()<CR>]], {noremap = true, silent = true, expr = false})
|
||||
|
||||
return M
|
@ -1,6 +0,0 @@
|
||||
local map = require 'utils.map'
|
||||
|
||||
map('n', '<leader>rc', ':Restart<cr>', {silent = true})
|
||||
|
||||
vim.cmd [[command! PackerRestart exe 'Restart' | exe 'PackerCompile' | exe 'PackerSync']]
|
||||
|
@ -1,23 +0,0 @@
|
||||
local map = require 'utils.map'
|
||||
local g = vim.g
|
||||
|
||||
g['sneak#label'] = 1
|
||||
|
||||
-- case insensitive sneak
|
||||
g['sneak#use_ic_scs'] = 1
|
||||
|
||||
-- immediately move to the next instance of search, if you move the cursor sneak is back to default behavior
|
||||
g['sneak#s_next'] = 1
|
||||
|
||||
-- remap so I can use , and ; with f and t
|
||||
map({'n', 'v'}, 'gS', '<plug>Sneak_;')
|
||||
map({'n', 'v'}, 'gs', '<plug>Sneak_;')
|
||||
-- map gS <Plug>Sneak_,
|
||||
-- map gs <Plug>Sneak_;
|
||||
|
||||
-- highlight Sneak guifg=black guibg=#00C7DF ctermfg=black ctermbg=cyan
|
||||
-- highlight SneakScope guifg=red guibg=yellow ctermfg=red ctermbg=yellow
|
||||
|
||||
-- Emoji prompt
|
||||
g['sneak#prompt'] = '🔎'
|
||||
|
@ -87,22 +87,29 @@ if fzfPlugin and fzfPlugin.loaded then
|
||||
end
|
||||
|
||||
|
||||
local silent = {silent = true}
|
||||
|
||||
local keymaps = {
|
||||
-- Search project files
|
||||
vim.keymap.set("n", "<C-p>", project_files, silent)
|
||||
{ "<C-p>", project_files, description = "Open git files" },
|
||||
|
||||
-- Search files from current working directory
|
||||
vim.keymap.set("n", "<leader>p", function() builtin.find_files() end, silent)
|
||||
{ "<leader>p", function() builtin.find_files() end, description = "Open files" },
|
||||
|
||||
-- Edit neovim config
|
||||
vim.keymap.set("n", "<leader>ce", edit_config, silent)
|
||||
{"<leader>ce", edit_config, description = "Edit neovim config" },
|
||||
|
||||
-- Find string
|
||||
vim.keymap.set("n", "<leader>fw", function() builtin.live_grep() end, silent)
|
||||
-- Grep string
|
||||
{ "<leader>fw", function() builtin.live_grep() end, description = "Grep" },
|
||||
|
||||
-- Change colorscheme
|
||||
vim.keymap.set("n", "<leader>cs", function() builtin.colorscheme() end, silent)
|
||||
{ "<leader>cs", function() builtin.colorscheme() end, description = "Change colorscheme" },
|
||||
|
||||
-- See help tags
|
||||
vim.keymap.set("n", "<leader>fh", function() builtin.help_tags() end, silent)
|
||||
{ "<leader>fh", function() builtin.help_tags() end, description = "Search help tags" }
|
||||
}
|
||||
|
||||
local silent = {silent = true}
|
||||
for _, keymap in ipairs(keymaps) do
|
||||
keymap.opts = silent
|
||||
end
|
||||
|
||||
require("legendary").keymaps(keymaps)
|
||||
|
@ -1,6 +1,4 @@
|
||||
return {
|
||||
"mcauley-penney/tidy.nvim",
|
||||
config = function()
|
||||
require("tidy").setup()
|
||||
end
|
||||
config = function() require("tidy").setup() end
|
||||
}
|
||||
|
@ -3,5 +3,9 @@ return {
|
||||
requires = "nvim-lua/plenary.nvim",
|
||||
config = function()
|
||||
require("todo-comments").setup { signs = false }
|
||||
|
||||
require("legendary").command{
|
||||
":TodoTelescope", description = "Show TODO's in telescope"
|
||||
}
|
||||
end
|
||||
}
|
||||
|
@ -4,6 +4,8 @@ return {
|
||||
config = function()
|
||||
require('toggleterm').setup()
|
||||
|
||||
vim.keymap.set("n", "<leader>t", ":ToggleTerm<CR>")
|
||||
require("legendary").keymap{
|
||||
"<leader>t", ":ToggleTerm<CR>", description = "Toggle terminal", opts = { silent = true }
|
||||
}
|
||||
end
|
||||
}
|
||||
|
@ -2,14 +2,14 @@ return {
|
||||
'folke/trouble.nvim',
|
||||
requires = 'kyazdani42/nvim-web-devicons',
|
||||
config = function ()
|
||||
local map = require 'utils.map'
|
||||
|
||||
require('trouble').setup()
|
||||
|
||||
local silent = {silent = true}
|
||||
|
||||
map('n', '<leader>qq', ':TroubleToggle document_diagnostics<cr>', silent)
|
||||
map('n', '<leader>qf', ':TroubleToggle workspace_diagnostics<cr>', silent)
|
||||
map('n', '<leader>rf', ':TroubleToggle lsp_references<cr>', silent)
|
||||
require("legendary").keymaps{
|
||||
{'<leader>qq', ':TroubleToggle document_diagnostics<cr>', description="Toggle file diagnostics", opts=silent},
|
||||
{'<leader>qf', ':TroubleToggle workspace_diagnostics<cr>', description="Toggle workspace diagnostics", opts=silent},
|
||||
{'gr', ':TroubleToggle lsp_references<cr>', description="Show references in trouble", opts=silent},
|
||||
}
|
||||
end
|
||||
}
|
||||
|
@ -1,2 +0,0 @@
|
||||
local g = vim.g
|
||||
g['vimspector_enable_mappings']="HUMAN"
|
@ -119,3 +119,12 @@ if vim.g.neovide then
|
||||
vim.g.neovide_scale_factor = 0.75
|
||||
vim.g.neovide_hide_mouse_when_typing = true
|
||||
end
|
||||
|
||||
-- Change c file comment string
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
group = vim.api.nvim_create_augroup("set-c-commentstring", { clear = true }),
|
||||
pattern = {"c", "cc", "cpp", "h", "hpp"},
|
||||
callback = function(data)
|
||||
vim.api.nvim_buf_set_option(data.buf, "commentstring", "// %s")
|
||||
end
|
||||
})
|
||||
|
@ -9,8 +9,8 @@ return function(use)
|
||||
use_config "toggleterm"
|
||||
use_config "baleia"
|
||||
use_config "todo-comments"
|
||||
use_config "legendary"
|
||||
use_config "dressing"
|
||||
use_config "legendary"
|
||||
use_config "move"
|
||||
use_config "gitblame"
|
||||
use_config "based"
|
||||
@ -30,6 +30,7 @@ return function(use)
|
||||
use_config "devicons"
|
||||
use_config "treesitter"
|
||||
use_config "ts-playground"
|
||||
use_config "diffview"
|
||||
|
||||
use {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
@ -70,7 +71,6 @@ return function(use)
|
||||
use "eandrju/cellular-automaton.nvim"
|
||||
use "tweekmonster/startuptime.vim"
|
||||
use "tpope/vim-unimpaired"
|
||||
use { "sindrets/diffview.nvim", requires = 'nvim-lua/plenary.nvim' }
|
||||
use "wellle/targets.vim"
|
||||
use "michaeljsmith/vim-indent-object"
|
||||
use "psliwka/vim-smoothie"
|
||||
|
Loading…
Reference in New Issue
Block a user