Simplify Neovim configuration
This commit is contained in:
parent
ae456f3317
commit
cf2cbbf19b
|
@ -17,49 +17,28 @@ with lib;
|
|||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
comment-nvim
|
||||
dial-nvim
|
||||
fidget-nvim
|
||||
conf-vim
|
||||
edit-alternate-vim
|
||||
gitsigns-nvim
|
||||
harpoon
|
||||
impatient-nvim
|
||||
mini-nvim
|
||||
neodev-nvim
|
||||
nvim-spectre
|
||||
nvim-web-devicons
|
||||
oil-nvim
|
||||
refactoring-nvim
|
||||
sort-nvim
|
||||
treesj
|
||||
standard-vim
|
||||
undotree
|
||||
vim-abolish
|
||||
vim-eunuch
|
||||
vim-highlightedyank
|
||||
vim-just
|
||||
vim-nix
|
||||
vim-obsession
|
||||
vim-pasta
|
||||
vim-repeat
|
||||
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-xmlattr
|
||||
vim-zoom
|
||||
vim-unimpaired
|
||||
|
||||
# Testing
|
||||
vim-test
|
||||
|
||||
# Git
|
||||
committia-vim
|
||||
diffview-nvim
|
||||
vim-fugitive
|
||||
|
||||
# Debugging
|
||||
|
|
|
@ -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")
|
|
@ -1,7 +0,0 @@
|
|||
require("fidget").setup {
|
||||
notification = {
|
||||
window = {
|
||||
winblend = 0,
|
||||
},
|
||||
},
|
||||
}
|
|
@ -15,4 +15,6 @@ require("mini.move").setup {}
|
|||
|
||||
require("mini.operators").setup {}
|
||||
|
||||
require("mini.splitjoin").setup {}
|
||||
|
||||
require("mini.surround").setup {}
|
||||
|
|
|
@ -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>",
|
||||
},
|
||||
}
|
|
@ -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>
|
||||
]])
|
|
@ -1 +0,0 @@
|
|||
require("spectre").setup()
|
|
@ -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)
|
|
@ -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)
|
Loading…
Reference in a new issue