Do some neovim tweaking.
This commit is contained in:
parent
310a76f359
commit
b21ce1860d
6 changed files with 58 additions and 13 deletions
26
stowers/nvim/dot-config/nvim/after/plugin/harpoon.lua
Normal file
26
stowers/nvim/dot-config/nvim/after/plugin/harpoon.lua
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
local harpoon = require("harpoon")
|
||||
|
||||
harpoon:setup()
|
||||
|
||||
-- basic telescope configuration
|
||||
local conf = require("telescope.config").values
|
||||
local function toggle_telescope(harpoon_files)
|
||||
local file_paths = {}
|
||||
for _, item in ipairs(harpoon_files.items) do
|
||||
table.insert(file_paths, item.value)
|
||||
end
|
||||
|
||||
require("telescope.pickers").new({}, {
|
||||
prompt_title = "Harpoon",
|
||||
finder = require("telescope.finders").new_table({
|
||||
results = file_paths,
|
||||
}),
|
||||
previewer = conf.file_previewer({}),
|
||||
sorter = conf.generic_sorter({}),
|
||||
}):find()
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "<leader>fh", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
||||
vim.keymap.set("n", "<leader>ha", function() harpoon:list():add() end)
|
||||
vim.keymap.set("n", "<leader>hd", function() harpoon:list():remove() end)
|
||||
vim.keymap.set("n", "<leader>hc", function() harpoon:list():clear() end)
|
||||
|
|
@ -6,4 +6,14 @@ vim.g.loaded_netrwPlugin = 1
|
|||
vim.opt.termguicolors = true
|
||||
|
||||
-- Use defaults
|
||||
require('nvim-tree').setup()
|
||||
require('nvim-tree').setup({
|
||||
actions = {
|
||||
open_file = {
|
||||
quit_on_open = true,
|
||||
},
|
||||
},
|
||||
view = {
|
||||
side = "right",
|
||||
width = 50,
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
require'nvim-treesitter.configs'.setup {
|
||||
-- A list of parser names, or "all" (the five listed parsers should always be installed)
|
||||
ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "elixir", "go", "bash", "javascript", "typescript", "rust", "graphql" },
|
||||
-- A list of parser names, or "all"
|
||||
ensure_installed = {},
|
||||
|
||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||
sync_install = false,
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@ local ensure_packer = function()
|
|||
})
|
||||
vim.cmd [[packadd packer.nvim]]
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
local packer_bootstrap = ensure_packer()
|
||||
|
|
@ -75,18 +75,20 @@ return require("packer").startup(function(use)
|
|||
"nvim-tree/nvim-web-devicons"
|
||||
}
|
||||
|
||||
-- Harpoon
|
||||
use {
|
||||
"ThePrimeagen/harpoon",
|
||||
branch = "harpoon2",
|
||||
requires = { { "nvim-lua/plenary.nvim" } }
|
||||
}
|
||||
|
||||
-- Git BLAME
|
||||
use {
|
||||
"APZelos/blamer.nvim", tag = "v1.3.0",
|
||||
}
|
||||
|
||||
-- Tab support
|
||||
use {
|
||||
"romgrk/barbar.nvim", tag = "v1.7.0",
|
||||
requires = {
|
||||
{ "lewis6991/gitsigns.nvim" }, -- Git status
|
||||
{ "nvim-tree/nvim-web-devicons" }, -- Icons
|
||||
}
|
||||
"airblade/vim-gitgutter", branch = "main",
|
||||
}
|
||||
|
||||
-- Automatically set indent values
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ vim.keymap.set('n', '<leader>q', function()
|
|||
end, {})
|
||||
|
||||
vim.keymap.set('n', '<leader>fv', vim.cmd.NvimTreeToggle, {})
|
||||
vim.keymap.set('n', '<leader>l', function() vim.opt.list = not(vim.opt.list:get()) end)
|
||||
|
||||
vim.keymap.set('n', '<C-w>|', wrap_args(vim.cmd.wincmd, 'v'), {})
|
||||
vim.keymap.set('n', '<C-w>-', wrap_args(vim.cmd.wincmd, 's'), {})
|
||||
|
|
@ -23,5 +24,3 @@ vim.keymap.set('n', '<M-k>', wrap_args(vim.cmd.wincmd, 'k'), {})
|
|||
vim.keymap.set('n', '<M-l>', wrap_args(vim.cmd.wincmd, 'l'), {})
|
||||
|
||||
vim.keymap.set('n', '<C-\\>', wrap_args(vim.cmd.wincmd, 'p'), {})
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,14 @@
|
|||
-- Line numbers
|
||||
vim.opt.nu = true
|
||||
vim.opt.relativenumber = true
|
||||
vim.opt.ruler = true
|
||||
vim.opt.wrap = true
|
||||
vim.opt.textwidth = 79
|
||||
vim.opt.fillchars = { eob = " " }
|
||||
vim.opt.showmode = true
|
||||
vim.opt.showcmd = true
|
||||
vim.opt.list = true
|
||||
vim.opt.listchars = "tab:▸ ,eol:¬"
|
||||
|
||||
-- Indent settings
|
||||
vim.opt.tabstop = 4
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue