Simplify Neovim configuration

This commit is contained in:
Oliver Davies 2024-12-30 18:45:50 +00:00
parent ae456f3317
commit cf2cbbf19b
9 changed files with 6 additions and 133 deletions

View file

@ -17,49 +17,28 @@ with lib;
plugins = with pkgs.vimPlugins; [ plugins = with pkgs.vimPlugins; [
comment-nvim comment-nvim
dial-nvim conf-vim
fidget-nvim edit-alternate-vim
gitsigns-nvim gitsigns-nvim
harpoon harpoon
impatient-nvim
mini-nvim mini-nvim
neodev-nvim
nvim-spectre
nvim-web-devicons nvim-web-devicons
oil-nvim oil-nvim
refactoring-nvim refactoring-nvim
sort-nvim standard-vim
treesj
undotree undotree
vim-abolish
vim-eunuch
vim-highlightedyank
vim-just
vim-nix vim-nix
vim-obsession
vim-pasta vim-pasta
vim-repeat vim-repeat
vim-sleuth vim-sleuth
vim-sort-motion
vim-terraform
vim-textobj-user
vim-unimpaired
conf-vim
edit-alternate-vim
nvim-tmux-navigation
standard-vim
vim-autoread
vim-textobj-indent vim-textobj-indent
vim-textobj-xmlattr vim-textobj-xmlattr
vim-zoom vim-unimpaired
# Testing # Testing
vim-test vim-test
# Git # Git
committia-vim
diffview-nvim
vim-fugitive vim-fugitive
# Debugging # Debugging

View file

@ -1,45 +0,0 @@
local augend = require "dial.augend"
local dial_config = require "dial.config"
dial_config.augends:register_group {
visual = {
augend.integer.alias.decimal,
augend.integer.alias.hex,
augend.date.alias["%Y/%m/%d"],
augend.constant.alias.alpha,
augend.constant.alias.Alpha,
},
mygroup = {
augend.constant.new {
elements = { "TRUE", "FALSE" },
word = true,
cyclic = true,
},
augend.constant.new {
elements = { "public", "protected", "private" },
word = true,
cyclic = true,
},
augend.constant.new {
elements = { "&&", "||" },
word = false,
cyclic = true,
},
augend.date.alias["%d/%m/%Y"],
augend.constant.alias.bool, -- boolean value (true <-> false)
augend.integer.alias.decimal,
augend.integer.alias.hex,
augend.semver.alias.semver,
},
}
local dial_map = require "dial.map"
vim.keymap.set("n", "<C-a>", dial_map.inc_normal "mygroup")
vim.keymap.set("n", "<C-x>", dial_map.dec_normal "mygroup")
vim.keymap.set("v", "<C-a>", dial_map.inc_normal "visual")
vim.keymap.set("v", "<C-x>", dial_map.dec_normal "visual")

View file

@ -1,7 +0,0 @@
require("fidget").setup {
notification = {
window = {
winblend = 0,
},
},
}

View file

@ -15,4 +15,6 @@ require("mini.move").setup {}
require("mini.operators").setup {} require("mini.operators").setup {}
require("mini.splitjoin").setup {}
require("mini.surround").setup {} require("mini.surround").setup {}

View file

@ -1,12 +0,0 @@
require("nvim-tmux-navigation").setup {
disable_when_zoomed = true,
keybindings = {
left = "<C-h>",
down = "<C-j>",
up = "<C-k>",
right = "<C-l>",
last_active = "<C-\\>",
next = "<C-Space>",
},
}

View file

@ -1,10 +0,0 @@
require("sort").setup()
vim.cmd([[
nnoremap <silent> go" vi"<Esc><Cmd>Sort<CR>
nnoremap <silent> go' vi'<Esc><Cmd>Sort<CR>
nnoremap <silent> go( vi(<Esc><Cmd>Sort<CR>
nnoremap <silent> go[ vi[<Esc><Cmd>Sort<CR>
nnoremap <silent> gop vip<Esc><Cmd>Sort<CR>
nnoremap <silent> go{ vi{<Esc><Cmd>Sort<CR>
]])

View file

@ -1 +0,0 @@
require("spectre").setup()

View file

@ -1,25 +0,0 @@
local set = vim.opt_local
-- Set local settings for terminal buffers
vim.api.nvim_create_autocmd("TermOpen", {
group = vim.api.nvim_create_augroup("custom-term-open", {}),
callback = function()
set.number = false
set.relativenumber = false
set.scrolloff = 0
vim.bo.filetype = "terminal"
end,
})
-- Easily hit escape in terminal mode.
vim.keymap.set("t", "<esc><esc>", "<c-\\><c-n>")
-- Open a terminal at the bottom of the screen with a fixed height.
vim.keymap.set("n", ",st", function()
vim.cmd.new()
vim.cmd.wincmd "J"
vim.api.nvim_win_set_height(0, 12)
vim.wo.winfixheight = true
vim.cmd.term()
end)

View file

@ -1,8 +0,0 @@
local tsj = require "treesj"
tsj.setup {
use_default_keymaps = false,
}
vim.keymap.set("n", "gJ", tsj.join)
vim.keymap.set("n", "gS", tsj.split)