mirror of
https://github.com/WarrenHood/dotfiles.git
synced 2025-04-29 15:04:59 +01:00
parent
0c216f8f8d
commit
419f0fe8d3
|
@ -101,61 +101,64 @@ if vim.g.neovide then
|
|||
end
|
||||
|
||||
|
||||
-- barbar
|
||||
local barbar_opts = { noremap = true, silent = true }
|
||||
|
||||
-- Move to previous/next
|
||||
map('n', '<A-,>', '<Cmd>BufferPrevious<CR>', barbar_opts)
|
||||
map('n', '<A-.>', '<Cmd>BufferNext<CR>', barbar_opts)
|
||||
-- Re-order to previous/next
|
||||
map('n', '<A-<>', '<Cmd>BufferMovePrevious<CR>', barbar_opts)
|
||||
map('n', '<A->>', '<Cmd>BufferMoveNext<CR>', barbar_opts)
|
||||
-- Goto buffer in position...
|
||||
map('n', '<A-1>', '<Cmd>BufferGoto 1<CR>', barbar_opts)
|
||||
map('n', '<A-2>', '<Cmd>BufferGoto 2<CR>', barbar_opts)
|
||||
map('n', '<A-3>', '<Cmd>BufferGoto 3<CR>', barbar_opts)
|
||||
map('n', '<A-4>', '<Cmd>BufferGoto 4<CR>', barbar_opts)
|
||||
map('n', '<A-5>', '<Cmd>BufferGoto 5<CR>', barbar_opts)
|
||||
map('n', '<A-6>', '<Cmd>BufferGoto 6<CR>', barbar_opts)
|
||||
map('n', '<A-7>', '<Cmd>BufferGoto 7<CR>', barbar_opts)
|
||||
map('n', '<A-8>', '<Cmd>BufferGoto 8<CR>', barbar_opts)
|
||||
map('n', '<A-9>', '<Cmd>BufferGoto 9<CR>', barbar_opts)
|
||||
map('n', '<A-0>', '<Cmd>BufferLast<CR>', barbar_opts)
|
||||
-- Pin/unpin buffer
|
||||
map('n', '<A-p>', '<Cmd>BufferPin<CR>', barbar_opts)
|
||||
-- Close buffer
|
||||
map('n', '<A-c>', '<Cmd>BufferClose<CR>', barbar_opts)
|
||||
-- Wipeout buffer
|
||||
-- :BufferWipeout
|
||||
|
||||
-- Close commands
|
||||
-- :BufferCloseAllButCurrent
|
||||
-- :BufferCloseAllButPinned
|
||||
-- :BufferCloseAllButCurrentOrPinned
|
||||
-- :BufferCloseBuffersLeft
|
||||
-- :BufferCloseBuffersRight
|
||||
-- Magic buffer-picking mode
|
||||
map('n', '<C-p>', '<Cmd>BufferPick<CR>', barbar_opts)
|
||||
-- Sort automatically by...
|
||||
map('n', '<Space>bb', '<Cmd>BufferOrderByBufferNumber<CR>', barbar_opts)
|
||||
map('n', '<Space>bd', '<Cmd>BufferOrderByDirectory<CR>', barbar_opts)
|
||||
map('n', '<Space>bl', '<Cmd>BufferOrderByLanguage<CR>', barbar_opts)
|
||||
map('n', '<Space>bw', '<Cmd>BufferOrderByWindowNumber<CR>', barbar_opts)
|
||||
|
||||
-- Other:
|
||||
-- :BarbarEnable - enables barbar (enabled by default)
|
||||
-- :BarbarDisable - very bad command, should never be used
|
||||
-- -- barbar
|
||||
-- local barbar_opts = { noremap = true, silent = true }
|
||||
--
|
||||
-- -- Move to previous/next
|
||||
-- map('n', '<A-,>', '<Cmd>BufferPrevious<CR>', barbar_opts)
|
||||
-- map('n', '<A-.>', '<Cmd>BufferNext<CR>', barbar_opts)
|
||||
-- -- Re-order to previous/next
|
||||
-- map('n', '<A-<>', '<Cmd>BufferMovePrevious<CR>', barbar_opts)
|
||||
-- map('n', '<A->>', '<Cmd>BufferMoveNext<CR>', barbar_opts)
|
||||
-- -- Goto buffer in position...
|
||||
-- map('n', '<A-1>', '<Cmd>BufferGoto 1<CR>', barbar_opts)
|
||||
-- map('n', '<A-2>', '<Cmd>BufferGoto 2<CR>', barbar_opts)
|
||||
-- map('n', '<A-3>', '<Cmd>BufferGoto 3<CR>', barbar_opts)
|
||||
-- map('n', '<A-4>', '<Cmd>BufferGoto 4<CR>', barbar_opts)
|
||||
-- map('n', '<A-5>', '<Cmd>BufferGoto 5<CR>', barbar_opts)
|
||||
-- map('n', '<A-6>', '<Cmd>BufferGoto 6<CR>', barbar_opts)
|
||||
-- map('n', '<A-7>', '<Cmd>BufferGoto 7<CR>', barbar_opts)
|
||||
-- map('n', '<A-8>', '<Cmd>BufferGoto 8<CR>', barbar_opts)
|
||||
-- map('n', '<A-9>', '<Cmd>BufferGoto 9<CR>', barbar_opts)
|
||||
-- map('n', '<A-0>', '<Cmd>BufferLast<CR>', barbar_opts)
|
||||
-- -- Pin/unpin buffer
|
||||
-- map('n', '<A-p>', '<Cmd>BufferPin<CR>', barbar_opts)
|
||||
-- -- Close buffer
|
||||
-- map('n', '<A-c>', '<Cmd>BufferClose<CR>', barbar_opts)
|
||||
-- -- Wipeout buffer
|
||||
-- -- :BufferWipeout
|
||||
--
|
||||
-- -- Close commands
|
||||
-- -- :BufferCloseAllButCurrent
|
||||
-- -- :BufferCloseAllButPinned
|
||||
-- -- :BufferCloseAllButCurrentOrPinned
|
||||
-- -- :BufferCloseBuffersLeft
|
||||
-- -- :BufferCloseBuffersRight
|
||||
-- -- Magic buffer-picking mode
|
||||
-- map('n', '<C-p>', '<Cmd>BufferPick<CR>', barbar_opts)
|
||||
-- -- Sort automatically by...
|
||||
-- map('n', '<Space>bb', '<Cmd>BufferOrderByBufferNumber<CR>', barbar_opts)
|
||||
-- map('n', '<Space>bd', '<Cmd>BufferOrderByDirectory<CR>', barbar_opts)
|
||||
-- map('n', '<Space>bl', '<Cmd>BufferOrderByLanguage<CR>', barbar_opts)
|
||||
-- map('n', '<Space>bw', '<Cmd>BufferOrderByWindowNumber<CR>', barbar_opts)
|
||||
--
|
||||
-- -- Other:
|
||||
-- -- :BarbarEnable - enables barbar (enabled by default)
|
||||
-- -- :BarbarDisable - very bad command, should never be used
|
||||
|
||||
|
||||
-- Disable arrow keys
|
||||
local arrows = {'<Up>', '<Down>', '<Left>', '<Right>'}
|
||||
for i=1,#arrows do
|
||||
map('n', arrows[i], function () end)
|
||||
map('i', arrows[i], function () end)
|
||||
local arrows = { '<Up>', '<Down>', '<Left>', '<Right>' }
|
||||
for i = 1, #arrows do
|
||||
map('n', arrows[i], function() end)
|
||||
map('i', arrows[i], function() end)
|
||||
end
|
||||
|
||||
-- Code actions with ctrl + .
|
||||
map('n', '<Leader>.', function() vim.lsp.buf.code_action({ apply = true}) end, { desc = 'Code action/Quick fix' })
|
||||
map('n', '<Leader>.', function() vim.lsp.buf.code_action({ apply = true }) end, { desc = 'Code action/Quick fix' })
|
||||
|
||||
-- Show telescope commands fuzzy finder
|
||||
map('n', '<Leader><Leader>', function() require('telescope.builtin').commands() end, { desc = 'Show commands' })
|
||||
|
||||
-- Show diagnostics in floating window
|
||||
map('n', '<Leader>e', function() vim.diagnostic.open_float() end, { desc = 'Show diagnostics' })
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
require("nvim-tree").setup()
|
||||
|
||||
-- tree-sitter config
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
require 'nvim-treesitter.configs'.setup {
|
||||
-- A list of parser names, or "all"
|
||||
|
||||
ensure_installed = { "c", "lua", "rust", "bash", "python", "javascript" },
|
||||
|
@ -34,7 +34,7 @@ require("luasnip").config.set_config({ -- Setting LuaSnip config
|
|||
store_selection_keys = "<Tab>",
|
||||
})
|
||||
|
||||
require("luasnip.loaders.from_lua").load({paths = "~/.config/nvim/LuaSnip/"})
|
||||
require("luasnip.loaders.from_lua").load({ paths = "~/.config/nvim/LuaSnip/" })
|
||||
|
||||
|
||||
-- Which-key config
|
||||
|
@ -90,3 +90,40 @@ require('which-key').register({
|
|||
-- indent-blankline setup
|
||||
require('ibl').setup()
|
||||
|
||||
-- Marks setup
|
||||
require('marks').setup({
|
||||
-- whether to map keybinds or not. default true
|
||||
default_mappings = true,
|
||||
-- which builtin marks to show. default {}
|
||||
-- builtin_marks = { ".", "<", ">", "^" },
|
||||
-- whether movements cycle back to the beginning/end of buffer. default true
|
||||
cyclic = true,
|
||||
-- whether the shada file is updated after modifying uppercase marks. default false
|
||||
force_write_shada = false,
|
||||
-- how often (in ms) to redraw signs/recompute mark positions.
|
||||
-- higher values will have better performance but may cause visual lag,
|
||||
-- while lower values may cause performance penalties. default 150.
|
||||
refresh_interval = 250,
|
||||
-- sign priorities for each type of mark - builtin marks, uppercase marks, lowercase
|
||||
-- marks, and bookmarks.
|
||||
-- can be either a table with all/none of the keys, or a single number, in which case
|
||||
-- the priority applies to all marks.
|
||||
-- default 10.
|
||||
sign_priority = { lower = 10, upper = 15, builtin = 8, bookmark = 20 },
|
||||
-- disables mark tracking for specific filetypes. default {}
|
||||
excluded_filetypes = {},
|
||||
-- disables mark tracking for specific buftypes. default {}
|
||||
excluded_buftypes = {},
|
||||
-- marks.nvim allows you to configure up to 10 bookmark groups, each with its own
|
||||
-- sign/virttext. Bookmarks can be used to group together positions and quickly move
|
||||
-- across multiple buffers. default sign is '!@#$%^&*()' (from 0 to 9), and
|
||||
-- default virt_text is "".
|
||||
-- bookmark_0 = {
|
||||
-- sign = "⚑",
|
||||
-- virt_text = "bookmark_0",
|
||||
-- -- explicitly prompt for a virtual line annotation when setting a bookmark from this group.
|
||||
-- -- defaults to false.
|
||||
-- annotate = false,
|
||||
-- },
|
||||
mappings = {}
|
||||
})
|
||||
|
|
|
@ -144,10 +144,10 @@ require("packer").startup(function()
|
|||
use { "jay-babu/mason-nvim-dap.nvim" }
|
||||
|
||||
-- Tab
|
||||
use {
|
||||
'romgrk/barbar.nvim',
|
||||
requires = { 'kyazdani42/nvim-web-devicons' },
|
||||
}
|
||||
-- use {
|
||||
-- 'romgrk/barbar.nvim',
|
||||
-- requires = { 'kyazdani42/nvim-web-devicons' },
|
||||
-- }
|
||||
|
||||
use {
|
||||
"nvim-neorg/neorg",
|
||||
|
@ -177,6 +177,9 @@ require("packer").startup(function()
|
|||
end
|
||||
})
|
||||
|
||||
-- Marks
|
||||
use("chentoast/marks.nvim")
|
||||
|
||||
|
||||
-- Automatically set up configuration after cloning packer.nvim
|
||||
if packer_bootstrap then
|
||||
|
|
Loading…
Reference in a new issue