aboutsummaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2023-01-26 23:16:14 +0200
committersrdusr <trevorgray@srdusr.com>2023-01-26 23:16:14 +0200
commit5e3e1199221adfbaaadd9ca8d62301adc0a856ad (patch)
tree24484ddf75760413fb09ae6d3f4e160690ee1cf9 /.config
parent04038fd26167c6a4fd1771773acece4cdb5f22f1 (diff)
parentc3141cd6756fd40692a79f7ef49223a66f993a4e (diff)
downloaddotfiles-5e3e1199221adfbaaadd9ca8d62301adc0a856ad.tar.gz
dotfiles-5e3e1199221adfbaaadd9ca8d62301adc0a856ad.zip
Merge commit '874d2c339ed888f122418752c250e317551cb048'
Diffstat (limited to '.config')
-rw-r--r--.config/nvim/lua/plugins/heirline.lua7
-rw-r--r--.config/nvim/lua/user/keys.lua40
-rw-r--r--.config/nvim/lua/user/pack.lua19
3 files changed, 58 insertions, 8 deletions
diff --git a/.config/nvim/lua/plugins/heirline.lua b/.config/nvim/lua/plugins/heirline.lua
index c05844b..03b2a47 100644
--- a/.config/nvim/lua/plugins/heirline.lua
+++ b/.config/nvim/lua/plugins/heirline.lua
@@ -1175,7 +1175,12 @@ local TabLine = {
TabPages,
}
-require("heirline").setup(StatusLine, WinBar, TabLine)
+require("heirline").setup({
+ statusline = StatusLine,
+ winbar = WinBar,
+ tabline = TabLine,
+ --statuscolumn = StatusColumn
+})
-- Yep, with heirline we're driving manual!
--vim.cmd([[au FileType * if index(['wipe', 'delete', 'unload'], &bufhidden) >= 0 | set nobuflisted | endif]])
diff --git a/.config/nvim/lua/user/keys.lua b/.config/nvim/lua/user/keys.lua
index 1aa5124..712835a 100644
--- a/.config/nvim/lua/user/keys.lua
+++ b/.config/nvim/lua/user/keys.lua
@@ -21,9 +21,15 @@ local term_opts = { noremap = true, silent = false }
--------------- Standard Operations ---------------
+
-- Semi-colon as leader key
vim.g.mapleader = ";"
---vim.g.maplocalleader = ";"
+
+-- Jump to next match on line using `.` instead of `;` NOTE: commented out in favour of "ggandor/flit.nvim"
+--map("n", ".", ";")
+
+-- Repeat last command using `<Space>` instead of `.` NOTE: commented out in favour of "ggandor/flit.nvim"
+--map("n", "<Space>", ".")
-- "jj" to exit insert-mode
map("i", "jj", "<esc>")
@@ -127,10 +133,34 @@ map("n", "<leader>gm", ":Gmove<Space>")
--end
--
--Easier split navigations, just ctrl-j instead of ctrl-w then j
-map("n", "<C-J>", "<C-W><C-J>")
-map("n", "<C-K>", "<C-W><C-K>")
-map("n", "<C-L>", "<C-W><C-L>")
-map("n", "<C-H>", "<C-W><C-H>")
+--map("n", "<C-J>", "<C-W><C-J>")
+--map("n", "<C-K>", "<C-W><C-K>")
+--map("n", "<C-L>", "<C-W><C-L>")
+--map("n", "<C-H>", "<C-W><C-H>")
+
+-- Tmux navigation (aserowy/tmux.nvim)
+--map("n", "<C-h>", ":lua require'tmux'.move_left()<cr>")
+--map("n", "<C-j>", ":lua require'tmux'.move_bottom()<cr>")
+--map("n", "<C-k>", ":lua require'tmux'.move_top()<cr>")
+--map("n", "<C-l>", ":lua require'tmux'.move_right()<cr>")
+map('n', '<C-h>', '<CMD>NavigatorLeft<CR>')
+map('n', '<C-l>', '<CMD>NavigatorRight<CR>')
+map('n', '<C-k>', '<CMD>NavigatorUp<CR>')
+map('n', '<C-j>', '<CMD>NavigatorDown<CR>')
+
+-- set line wrap
+map("n", "<M-z>", function()
+ local wrap_status = vim.api.nvim_exec("set wrap ?", true)
+
+ if wrap_status == "nowrap" then
+ vim.api.nvim_command("set wrap linebreak")
+ print("Wrap enabled")
+ else
+ vim.api.nvim_command("set wrap nowrap")
+ print("Wrap disabled")
+ end
+end, { silent = true })
+
-- Combine buffers list with buffer name
map("n", "<Leader>b", ":buffers<CR>:buffer<Space>")
diff --git a/.config/nvim/lua/user/pack.lua b/.config/nvim/lua/user/pack.lua
index e2d1cb1..43b7a36 100644
--- a/.config/nvim/lua/user/pack.lua
+++ b/.config/nvim/lua/user/pack.lua
@@ -44,7 +44,7 @@ return packer.startup(function(use)
use("wbthomason/packer.nvim") -- Have packer manage itself
use("lewis6991/impatient.nvim")
- use("nvim-lua/plenary.nvim") -- Useful lua functions used ny lots of plugins
+ use("nvim-lua/plenary.nvim") -- Useful lua functions used by lots of plugins
--use("jose-elias-alvarez/null-ls.nvim")
-- lsp
@@ -329,7 +329,7 @@ return packer.startup(function(use)
-- Utilities
use("nathom/filetype.nvim")
- use("christoomey/vim-tmux-navigator")
+ --use("christoomey/vim-tmux-navigator")
use("preservim/vimux")
use("myusuf3/numbers.vim")
use("windwp/nvim-autopairs")
@@ -368,6 +368,21 @@ return packer.startup(function(use)
--use("rmagatti/session-lens")
--use("ahmedkhalf/project.nvim")
--use("aserowy/tmux.nvim")
+ --use({
+ -- "aserowy/tmux.nvim",
+ -- config = function() return require("tmux").setup() {
+ -- copy_sync = {
+ -- enable = false,
+ -- },
+ -- }
+ -- end,
+ --})
+ use({
+ 'numToStr/Navigator.nvim',
+ config = function()
+ require('Navigator').setup()
+ end,
+ })
--use("wakatime/vim-wakatime")
--use("tpope/vim-eunuch")
-- Handy unix command inside Vim (Rename, Move etc.)