Compare commits
2 Commits
85d4c44b31
...
2fe6a440b7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2fe6a440b7 | ||
|
|
ccbebb5ceb |
2
init.lua
2
init.lua
@@ -21,6 +21,7 @@ require("lazy").setup({
|
|||||||
'stevearc/conform.nvim', --auto formats certain text
|
'stevearc/conform.nvim', --auto formats certain text
|
||||||
'tpope/vim-commentary', -- commenting lines with shortcut
|
'tpope/vim-commentary', -- commenting lines with shortcut
|
||||||
'vigoux/ltex-ls.nvim', -- grammer checking
|
'vigoux/ltex-ls.nvim', -- grammer checking
|
||||||
|
'pynappo/hyprlang-to-lua.nvim',
|
||||||
-- 'vimpostor/vim-tpipeline', -- integrate with tmux status-line
|
-- 'vimpostor/vim-tpipeline', -- integrate with tmux status-line
|
||||||
'kshenoy/vim-signature', -- tag lines
|
'kshenoy/vim-signature', -- tag lines
|
||||||
'mg979/vim-visual-multi', -- work on multiple lines at once
|
'mg979/vim-visual-multi', -- work on multiple lines at once
|
||||||
@@ -35,7 +36,6 @@ require("lazy").setup({
|
|||||||
{ "nvzone/typr", dependencies = "nvzone/volt", cmd = { "Typr", "TyprStats" }, }, --typing practice
|
{ "nvzone/typr", dependencies = "nvzone/volt", cmd = { "Typr", "TyprStats" }, }, --typing practice
|
||||||
{ 'nvim-telescope/telescope.nvim', tag = 'v0.2.0', dependencies = { 'nvim-lua/plenary.nvim', 'BurntSushi/ripgrep', 'sharkdp/fd' } }, -- fuzyfinding over lists
|
{ 'nvim-telescope/telescope.nvim', tag = 'v0.2.0', dependencies = { 'nvim-lua/plenary.nvim', 'BurntSushi/ripgrep', 'sharkdp/fd' } }, -- fuzyfinding over lists
|
||||||
{ 'norcalli/nvim-colorizer.lua', config = function() require('colorizer').setup{"*"} end,}, -- preview colors
|
{ 'norcalli/nvim-colorizer.lua', config = function() require('colorizer').setup{"*"} end,}, -- preview colors
|
||||||
{ 'NMAC427/guess-indent.nvim', config = function() require('guess-indent').setup {} end,}, -- Detect tabstop and shiftwidth automatically
|
|
||||||
{ 'edluffy/hologram.nvim', auto_display = true,}, --image viewer
|
{ 'edluffy/hologram.nvim', auto_display = true,}, --image viewer
|
||||||
{ "denialofsandwich/sudo.nvim", dependencies = { "MunifTanjim/nui.nvim", },config = true, }, --write restricted files without restart
|
{ "denialofsandwich/sudo.nvim", dependencies = { "MunifTanjim/nui.nvim", },config = true, }, --write restricted files without restart
|
||||||
{ 'akinsho/toggleterm.nvim', version = "*", config = true}, -- terminal toggling and commands
|
{ 'akinsho/toggleterm.nvim', version = "*", config = true}, -- terminal toggling and commands
|
||||||
|
|||||||
@@ -3,48 +3,49 @@
|
|||||||
"base16-nvim": { "branch": "master", "commit": "23e5128eb5f629c29532c24a1e733cbe019f05bb" },
|
"base16-nvim": { "branch": "master", "commit": "23e5128eb5f629c29532c24a1e733cbe019f05bb" },
|
||||||
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
|
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
|
||||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "dca1a190aa85f9065979ef35802fb77131911106" },
|
"conform.nvim": { "branch": "master", "commit": "619363c30309d29ffa631e67c8183f2a72caa373" },
|
||||||
"dashboard-nvim": { "branch": "master", "commit": "f787e3462c2ee2b6117b17c1aa4ddf66cb6f57fe" },
|
"dashboard-nvim": { "branch": "master", "commit": "f787e3462c2ee2b6117b17c1aa4ddf66cb6f57fe" },
|
||||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||||
"fd": { "branch": "master", "commit": "7f1b1471d5e3f88087eaad77885dc70968750bb3" },
|
"distant.nvim": { "branch": "v0.3", "commit": "67d6b066e8490725718b79f643966f4eafc7da3c" },
|
||||||
"fzf-lua": { "branch": "main", "commit": "33fe4b6f0c817c4d99a7baeea82c4d17e57efd64" },
|
"fd": { "branch": "master", "commit": "42b2ab8a84ddedf80eeed9079128c60161f64658" },
|
||||||
|
"fzf-lua": { "branch": "main", "commit": "fea9eedc6894c44d44cbb772a5cd11c93b82d7a1" },
|
||||||
"gemini-cli.nvim": { "branch": "main", "commit": "c9fd62adda823628f5131a939d9c56ef7a898600" },
|
"gemini-cli.nvim": { "branch": "main", "commit": "c9fd62adda823628f5131a939d9c56ef7a898600" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "dd3f588bacbeb041be6facf1742e42097f62165d" },
|
"gitsigns.nvim": { "branch": "main", "commit": "dd3f588bacbeb041be6facf1742e42097f62165d" },
|
||||||
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
|
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
|
||||||
"hardtime.nvim": { "branch": "main", "commit": "b4e431934af1fe224a3a801f632c008278cb7628" },
|
"hardtime.nvim": { "branch": "main", "commit": "b4e431934af1fe224a3a801f632c008278cb7628" },
|
||||||
"hex.nvim": { "branch": "master", "commit": "b46e63356a69e8d6f046c38a9708d55d17f15038" },
|
"hex.nvim": { "branch": "master", "commit": "b46e63356a69e8d6f046c38a9708d55d17f15038" },
|
||||||
"hologram.nvim": { "branch": "main", "commit": "f5194f71ec1578d91b2e3119ff08e574e2eab542" },
|
"hologram.nvim": { "branch": "main", "commit": "f5194f71ec1578d91b2e3119ff08e574e2eab542" },
|
||||||
|
"hyprlang-to-lua.nvim": { "branch": "main", "commit": "477430d9f379736bc2260086eb63517bb585b5d8" },
|
||||||
"inc-rename.nvim": { "branch": "main", "commit": "0074b551a17338ccdcd299bd86687cc651bcb33d" },
|
"inc-rename.nvim": { "branch": "main", "commit": "0074b551a17338ccdcd299bd86687cc651bcb33d" },
|
||||||
"jq.nvim": { "branch": "main", "commit": "70e12681b1026ba7c06c691fd815eed0e2244b81" },
|
"jq.nvim": { "branch": "main", "commit": "70e12681b1026ba7c06c691fd815eed0e2244b81" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||||
"log-highlight.nvim": { "branch": "main", "commit": "b2e00cfd41ca94338265a595f3f3f423d9f9322e" },
|
"log-highlight.nvim": { "branch": "main", "commit": "b2e00cfd41ca94338265a595f3f3f423d9f9322e" },
|
||||||
"ltex-ls.nvim": { "branch": "main", "commit": "968eac261279d88d7f1ed556aa2dbc535a7489fe" },
|
"ltex-ls.nvim": { "branch": "main", "commit": "968eac261279d88d7f1ed556aa2dbc535a7489fe" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "131a558e13f9f28b15cd235557150ccb23f89286" },
|
"lualine.nvim": { "branch": "master", "commit": "131a558e13f9f28b15cd235557150ccb23f89286" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "51feb0ada33d18f3c5c71ffb46005dbf8b33bef4" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "7b01e2974a47d489bb92f47a41e4c0088ea8f86e" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "e54f5bf5f12c560da31c17eee5b3e1bd369f3ff9" },
|
"mason.nvim": { "branch": "main", "commit": "bb639d4bf385a4d89f478b83af4d770be05ab7eb" },
|
||||||
"mini.nvim": { "branch": "main", "commit": "199b3344d4c0dab13e45483834ce11bb7744fa3a" },
|
"mini.nvim": { "branch": "main", "commit": "9d0b9b7188d5c24b5a87f0d8b383ec8bda7a0de4" },
|
||||||
"mini.pick": { "branch": "main", "commit": "437d44eb57312f23e6b931704694fc294922cd88" },
|
"mini.pick": { "branch": "main", "commit": "26f94e9c84f529d713de00b900c0a307ca260f35" },
|
||||||
"neogit": { "branch": "master", "commit": "395ac481e197784e410b59b987fadaf9e7481df1" },
|
"neogit": { "branch": "master", "commit": "99326a1310fb2d616b455d2fd16d01bf00682f06" },
|
||||||
"neoscroll.nvim": { "branch": "master", "commit": "c8d29979cb0cb3a2437a8e0ae683fd82f340d3b8" },
|
"neoscroll.nvim": { "branch": "master", "commit": "c8d29979cb0cb3a2437a8e0ae683fd82f340d3b8" },
|
||||||
"nui-components.nvim": { "branch": "main", "commit": "1654dd709f13874089eefc80d82e0eb667f7fdfb" },
|
"nui-components.nvim": { "branch": "main", "commit": "1654dd709f13874089eefc80d82e0eb667f7fdfb" },
|
||||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "7b9923abad60b903ece7c52940e1321d39eccc79" },
|
"nvim-autopairs": { "branch": "master", "commit": "7b9923abad60b903ece7c52940e1321d39eccc79" },
|
||||||
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
|
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
|
||||||
"nvim-dap": { "branch": "master", "commit": "45a69eba683a2c448dd9ecfc4de89511f0646b5f" },
|
"nvim-dap": { "branch": "master", "commit": "531771530d4f82ad2d21e436e3cc052d68d7aebb" },
|
||||||
"nvim-java": { "branch": "main", "commit": "602a5f7fa92f9c1d425a2159133ff9de86842f0a" },
|
"nvim-java": { "branch": "main", "commit": "602a5f7fa92f9c1d425a2159133ff9de86842f0a" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "451d4ef9abd4f0f08e379ef0d55d1c391b6125a7" },
|
"nvim-lspconfig": { "branch": "master", "commit": "9573948c38bfabeec353ae7dd7d3ffec4c506a6b" },
|
||||||
"nvim-man": { "branch": "master", "commit": "7fe6b3b78c71c9ef834c49e3dcbd955f7ed5c6cb" },
|
|
||||||
"nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" },
|
"nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" },
|
||||||
"nvim-tree.lua": { "branch": "master", "commit": "f9bfc0059eca24546b69a7006110463da4808f8f" },
|
"nvim-tree.lua": { "branch": "master", "commit": "07f541fcaa4a5ae019598240362449ab7e9812b3" },
|
||||||
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
|
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "2795c26c916bb3c57dde308b82be51971fa92747" },
|
"nvim-web-devicons": { "branch": "master", "commit": "dfbfaa967a6f7ec50789bead7ef87e336c1fa63c" },
|
||||||
"obsidian.nvim": { "branch": "main", "commit": "ed6f386abe83e4dafa9afecf50cd9d9fff072a07" },
|
"obsidian.nvim": { "branch": "main", "commit": "d2349fdeb2c1e30cc2126fc6c7712f5103de8d15" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
|
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
|
||||||
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
|
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
|
||||||
"render-markdown.nvim": { "branch": "main", "commit": "629eb9533ec989d9d5c6cab8f3ad5372422c24e0" },
|
"render-markdown.nvim": { "branch": "main", "commit": "5adf0895310c1904e5abfaad40a2baad7fe44a07" },
|
||||||
"resize.nvim": { "branch": "main", "commit": "0b8943ef2ce54e65b9e56974e94dee593b28e7b5" },
|
"resize.nvim": { "branch": "main", "commit": "0b8943ef2ce54e65b9e56974e94dee593b28e7b5" },
|
||||||
"ripgrep": { "branch": "master", "commit": "4519153e5e461527f4bca45b042fff45c4ec6fb9" },
|
"ripgrep": { "branch": "master", "commit": "4857d6fa67db69a95cd4b6f2adda5d807d4d0119" },
|
||||||
"snacks.nvim": { "branch": "main", "commit": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e" },
|
"snacks.nvim": { "branch": "main", "commit": "882c996cf28183f4d63640de0b4c02ec886d01f2" },
|
||||||
"spring-boot.nvim": { "branch": "main", "commit": "218c0c26c14d99feca778e4d13f5ec3e8b1b60f0" },
|
"spring-boot.nvim": { "branch": "main", "commit": "218c0c26c14d99feca778e4d13f5ec3e8b1b60f0" },
|
||||||
"sudo.nvim": { "branch": "main", "commit": "10c211716f0f0149ea91732bc12338ade76d4af8" },
|
"sudo.nvim": { "branch": "main", "commit": "10c211716f0f0149ea91732bc12338ade76d4af8" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "e69b434b968a33815e2f02a5c7bd7b8dd4c7d4b2" },
|
"telescope.nvim": { "branch": "master", "commit": "e69b434b968a33815e2f02a5c7bd7b8dd4c7d4b2" },
|
||||||
@@ -57,7 +58,7 @@
|
|||||||
"vim-signature": { "branch": "master", "commit": "6bc3dd1294a22e897f0dcf8dd72b85f350e306bc" },
|
"vim-signature": { "branch": "master", "commit": "6bc3dd1294a22e897f0dcf8dd72b85f350e306bc" },
|
||||||
"vim-termhere": { "branch": "main", "commit": "b66d429dd48b74802f09fd059bc499c253372a1c" },
|
"vim-termhere": { "branch": "main", "commit": "b66d429dd48b74802f09fd059bc499c253372a1c" },
|
||||||
"vim-visual-multi": { "branch": "master", "commit": "a6975e7c1ee157615bbc80fc25e4392f71c344d4" },
|
"vim-visual-multi": { "branch": "master", "commit": "a6975e7c1ee157615bbc80fc25e4392f71c344d4" },
|
||||||
"vimtex": { "branch": "master", "commit": "97e11bd4f56d46a87f8593d6ccb27820e19c4ab0" },
|
"vimtex": { "branch": "master", "commit": "24e229914182ff301496a3e2c4214b28c4928d3f" },
|
||||||
"volt": { "branch": "main", "commit": "620de1321f275ec9d80028c68d1b88b409c0c8b1" },
|
"volt": { "branch": "main", "commit": "620de1321f275ec9d80028c68d1b88b409c0c8b1" },
|
||||||
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
-- lua/autocommands.lua
|
||||||
|
-- Defines autocommands to run on certain events happening
|
||||||
|
-- TODO clean this with functions
|
||||||
|
|
||||||
-- [[dynamically change kitty window opacity when opening and closing]]
|
-- [[dynamically change kitty window opacity when opening and closing]]
|
||||||
-- Define the target opacities
|
-- Define the target opacities
|
||||||
local nvim_opacity = "0.85"
|
local nvim_opacity = "0.85"
|
||||||
|
|||||||
23
lua/custom-functions.lua
Normal file
23
lua/custom-functions.lua
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
-- lua/custom-functions.lua
|
||||||
|
-- A library file with custom functions for cleaner code elsewhere
|
||||||
|
|
||||||
|
local C = {}
|
||||||
|
function C.runLastCommand()
|
||||||
|
-- TODO fix implementation
|
||||||
|
local term = require("toggleterm.terminal").get(1)-- Get terminal ID 1
|
||||||
|
-- Save position and buffer context
|
||||||
|
if term then
|
||||||
|
local original_window = vim.api.nvim_get_current_win()
|
||||||
|
local saved_view = vim.fn.winsaveview()
|
||||||
|
-- Using \r (carriage return) or \n\n often bypasses shell interceptors
|
||||||
|
-- term:send("clear\r")
|
||||||
|
term:send("test_dev.sh\r")
|
||||||
|
vim.api.nvim_set_current_win(original_window)
|
||||||
|
vim.fn.winrestview(saved_view)
|
||||||
|
else
|
||||||
|
vim.notify("Terminal 1 is not open yet!", vim.log.levels.WARN)
|
||||||
|
end
|
||||||
|
-- Return logic
|
||||||
|
end
|
||||||
|
|
||||||
|
return C
|
||||||
176
lua/keybinds.lua
176
lua/keybinds.lua
@@ -1,82 +1,126 @@
|
|||||||
--/lua/keybinds.lua
|
--/lua/keybinds.lua
|
||||||
-- This file defines all of the kybinds for nvim.
|
-- This file defines all of the kybinds for nvim.
|
||||||
-- vim.keymap.set('mode','<modifier>key','action', {desc = 'description'})
|
-- vim.keymap.set('mode','<modifier>key','action', {desc = 'description'})
|
||||||
|
local utils = require("custom-functions")
|
||||||
|
|
||||||
-- move betwwen buffer easier
|
-- move betwwen buffer easier
|
||||||
vim.keymap.set('n', '<Tab>', ':bnext<CR>')
|
vim.keymap.set('n','<Tab>' ,':bnext<CR>')
|
||||||
vim.keymap.set('n', '<S-Tab>', ':bprev<CR>')
|
vim.keymap.set('n','<S-Tab>' ,':bprev<CR>')
|
||||||
vim.keymap.set('n', '<leader>x', ':bdelete<CR>')
|
vim.keymap.set('n','<leader>x' ,':bdelete<CR>')
|
||||||
|
-- resizing pains with resize.lua shortcut
|
||||||
-- resizing pains with resize.lua shortcut
|
vim.keymap.set('n','<M-Left>' ,"<cmd>lua require('resize').ResizeLeft()<CR>")
|
||||||
vim.keymap.set('n', '<M-Left>', "<cmd>lua require('resize').ResizeLeft()<CR>")
|
vim.keymap.set('n','<M-Right>' ,"<cmd>lua require('resize').ResizeRight()<CR>")
|
||||||
vim.keymap.set('n', '<M-Right>', "<cmd>lua require('resize').ResizeRight()<CR>")
|
vim.keymap.set('n','<M-Up>' ,"<cmd>lua require('resize').ResizeUp()<CR>")
|
||||||
vim.keymap.set('n', '<M-Up>', "<cmd>lua require('resize').ResizeUp()<CR>")
|
vim.keymap.set('n','<M-Down>' ,"<cmd>lua require('resize').ResizeDown()<CR>")
|
||||||
vim.keymap.set('n', '<M-Down>', "<cmd>lua require('resize').ResizeDown()<CR>")
|
-- terminal interface shortcuts
|
||||||
|
vim.keymap.set('n','<Esc>' ,'<cmd>nohlsearch<CR>')
|
||||||
-- termunal interface shortcuts
|
vim.keymap.set('t','<Esc><Esc>' ,'<C-\\><C-n>' ,{ desc = 'Exit terminal mode' })
|
||||||
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
|
vim.keymap.set('n','<leader>r' ,'<cmd>TermExec cmd="clear && make"<CR>' ,{ desc = '[r]un make in terminal' })
|
||||||
|
vim.keymap.set('n','<leader>n' ,'<cmd>ToggleTerm direction=vertical name=compile size=70<CR>', { desc = 'open a [n]ew terminal' })
|
||||||
|
vim.keymap.set('n','<leader>t' ,'<cmd>ToggleTerm<CR>' ,{desc = '[T]oggle all terminals'})
|
||||||
|
vim.keymap.set("n","<leader>e" ,"<cmd>NvimTreeToggle<CR>" ,{desc = 'open [E]xplorer'})
|
||||||
|
vim.keymap.set("n", "<leader>l" ,utils.runLastCommand ,{ desc = "Run [L]ast command in terminal 1" })
|
||||||
-- Diagnostic keymaps
|
-- Diagnostic keymaps
|
||||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
|
vim.keymap.set('n', '<leader>q' ,vim.diagnostic.setloclist ,{ desc = 'Open diagnostic [Q]uickfix list' })
|
||||||
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
|
|
||||||
-- vim.keymap.set("n", "<leader>a", ":IncRename ", {desc = 'ren[A]me variable under cursor'})
|
|
||||||
vim .keymap.set('n','<leader>r','<cmd>TermExec cmd="clear && make"<CR>', { desc = '[r]un make in terminal' })
|
|
||||||
vim .keymap .set('n','<leader>n', '<cmd>ToggleTerm direction=vertical name=compile size=70<CR>', { desc = 'open a [n]ew terminal' })
|
|
||||||
vim.keymap.set('n','<leader>t', '<cmd>ToggleTerm<CR>', {desc = '[T]oggle all terminals'})
|
|
||||||
vim.keymap.set("n", "<leader>l", function()
|
|
||||||
-- Get terminal ID 1
|
|
||||||
-- Save position and buffer context
|
|
||||||
local term = require("toggleterm.terminal").get(1)
|
|
||||||
if term then
|
|
||||||
local original_window = vim.api.nvim_get_current_win()
|
|
||||||
local saved_view = vim.fn.winsaveview()
|
|
||||||
-- Using \r (carriage return) or \n\n often bypasses shell interceptors
|
|
||||||
-- term:send("clear\r")
|
|
||||||
term:send("test_dev.sh\r")
|
|
||||||
vim.api.nvim_set_current_win(original_window)
|
|
||||||
vim.fn.winrestview(saved_view)
|
|
||||||
else
|
|
||||||
vim.notify("Terminal 1 is not open yet!", vim.log.levels.WARN)
|
|
||||||
end
|
|
||||||
-- Return logic
|
|
||||||
end, { desc = "Run [L]ast command in terminal 1" })
|
|
||||||
|
|
||||||
-- TIP: Disable arrow keys in normal mode
|
-- Disable arrow keys in normal mode
|
||||||
vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
|
vim.keymap.set('n','<left>' ,'<cmd>echo "Use h to move!!"<CR>')
|
||||||
vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
|
vim.keymap.set('n','<right>' ,'<cmd>echo "Use l to move!!"<CR>')
|
||||||
vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
|
vim.keymap.set('n','<up>' ,'<cmd>echo "Use k to move!!"<CR>')
|
||||||
vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
|
vim.keymap.set('n','<down>' ,'<cmd>echo "Use j to move!!"<CR>')
|
||||||
|
|
||||||
-- Keybinds to make split navigation easier.
|
|
||||||
-- Use CTRL+<hjkl> to switch between windows
|
|
||||||
--
|
|
||||||
-- See `:help wincmd` for a list of all window commands
|
-- See `:help wincmd` for a list of all window commands
|
||||||
vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
|
vim.keymap.set('n','<C-h>' ,'<C-w><C-h>' ,{ desc = 'Move focus to the left window' })
|
||||||
vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
|
vim.keymap.set('n','<C-l>' ,'<C-w><C-l>' ,{ desc = 'Move focus to the right window' })
|
||||||
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
|
vim.keymap.set('n','<C-j>' ,'<C-w><C-j>' ,{ desc = 'Move focus to the lower window' })
|
||||||
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
|
vim.keymap.set('n','<C-k>' ,'<C-w><C-k>' ,{ desc = 'Move focus to the upper window' })
|
||||||
|
|
||||||
-- NOTE: Some terminals have colliding keymaps or are not able to send distinct keycodes
|
-- NOTE: Some terminals have colliding keymaps or are not able to send distinct keycodes
|
||||||
vim.keymap.set("n", "<C-S-h>", "<C-w>H", { desc = "Move window to the left" })
|
vim.keymap.set("n","<C-S-h>" ,"<C-w>H" ,{ desc = "Move window to the left" })
|
||||||
vim.keymap.set("n", "<C-S-l>", "<C-w>L", { desc = "Move window to the right" })
|
vim.keymap.set("n","<C-S-l>" ,"<C-w>L" ,{ desc = "Move window to the right" })
|
||||||
vim.keymap.set("n", "<C-S-j>", "<C-w>J", { desc = "Move window to the lower" })
|
vim.keymap.set("n","<C-S-j>" ,"<C-w>J" ,{ desc = "Move window to the lower" })
|
||||||
vim.keymap.set("n", "<C-S-k>", "<C-w>K", { desc = "Move window to the upper" })
|
vim.keymap.set("n","<C-S-k>" ,"<C-w>K" ,{ desc = "Move window to the upper" })
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>e", "<cmd>NvimTreeToggle<CR>", {desc = 'open [E]xplorer'})
|
-- [[ Basic QOL
|
||||||
|
-- vim.keymap.set("n", "<leader>a", ":IncRename ", {desc = 'ren[A]me variable under cursor'})
|
||||||
|
|
||||||
-- gemini CLI bindings
|
-- PLUGIN KEYBINDS
|
||||||
vim.keymap.set('n', "<leader>a/", "<cmd>Gemini toggle<cr>", { desc = "Toggle Gemini CLI" })
|
-- gemini CLI bindngs
|
||||||
vim.keymap.set('n', "<leader>aa", "<cmd>Gemini toggle<cr>", { desc = "Toggle Gemini CLI" })
|
-- TODO better AI implementation
|
||||||
vim.keymap.set('n', "<leader>aq", "<cmd>Gemini ask<cr>", { desc = "Ask Gemini", })
|
vim.keymap.set('n',"<leader>a/" ,"<cmd>Gemini toggle<cr>" ,{ desc = "Toggle Gemini CLI" })
|
||||||
vim.keymap.set('n', "<leader>af", "<cmd>Gemini add_file<cr>", { desc = "Add File"} )
|
vim.keymap.set('n',"<leader>aa" ,"<cmd>Gemini toggle<cr>" ,{ desc = "Toggle Gemini CLI" })
|
||||||
|
vim.keymap.set('n',"<leader>aq" ,"<cmd>Gemini ask<cr>" ,{ desc = "Ask Gemini", })
|
||||||
|
vim.keymap.set('n',"<leader>af" ,"<cmd>Gemini add_file<cr>" ,{ desc = "Add File"} )
|
||||||
|
|
||||||
-- spellcheck keybind to toggle on current buffer
|
--spellcheck keybind to toggle on current buffer
|
||||||
vim.keymap.set('n', "<leader>ze", "<cmd>setlocal spell<cr>", { desc = "enable spellecheck on buffer" })
|
vim.keymap.set('n',"<leader>ze" ,"<cmd>setlocal spell<cr>" ,{ desc = "enable spellecheck on buffer" })
|
||||||
vim.keymap.set('n', "<leader>zd", "<cmd>setlocal nospell<cr>", { desc = "Disable spellecheck on buffer" })
|
vim.keymap.set('n',"<leader>zd" ,"<cmd>setlocal nospell<cr>" ,{ desc = "Disable spellecheck on buffer" })
|
||||||
|
|
||||||
--basic qol
|
|
||||||
-- Bitburner Sync Keybinds
|
|
||||||
vim.keymap.set('n', '<leader>bp', '<cmd>BBPull<CR>', { desc = '[B]itburner [P]ull' })
|
|
||||||
vim.keymap.set('n', '<leader>bu', '<cmd>BBPush<CR>', { desc = '[B]itburner [U]pload/Push' })
|
|
||||||
vim.keymap.set('n', '<leader>br', '<cmd>BBRam<CR>', { desc = '[B]itburner [R]am check' })
|
|
||||||
--Hex Editing
|
--Hex Editing
|
||||||
vim.keymap.set('n', '<leader>hh', '<cmd>Hex<CR>', { desc = 'open [H]ex view of a file' })
|
vim.keymap.set('n', '<leader>hh' ,'<cmd>Hex<CR>' ,{ desc = 'open [H]ex view of a file' })
|
||||||
|
|
||||||
|
--Neogit
|
||||||
|
-- <leader>gg bound to UI toggle
|
||||||
|
vim.keymap.set('n', '<leader>gg' ,'<cmd>Neogit<cr>' ,{ desc = 'open Neo[g]it interface' })
|
||||||
|
vim.keymap.set('n', '<leader>gc' ,'<cmd>Neogit commit<cr>' ,{ desc = 'open Neogit [c]ommit page' })
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -52,6 +52,10 @@ vim.o.scrolloff = 25
|
|||||||
-- See `:help 'confirm'`
|
-- See `:help 'confirm'`
|
||||||
vim.o.confirm = true
|
vim.o.confirm = true
|
||||||
|
|
||||||
|
-- vim.opt.expandtab = false -- Do NOT turn tabs into spaces
|
||||||
|
-- vim.opt.tabstop = 4 -- A literal \t character looks 4 columns wide
|
||||||
|
-- vim.opt.shiftwidth = 4 -- Number of spaces for automated indentation (<< or >>)
|
||||||
|
-- vim.opt.softtabstop = 0 -- Let the backspace key delete a full hard tab
|
||||||
|
|
||||||
vim.opt.termguicolors = true -- required for colorizer
|
vim.opt.termguicolors = true -- required for colorizer
|
||||||
|
|
||||||
|
|||||||
@@ -72,6 +72,14 @@ return { -- adds lsp functionality and api for included languages
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
'NMAC427/guess-indent.nvim',
|
||||||
|
config = function()
|
||||||
|
require('guess-indent').setup ({
|
||||||
|
filetype_exclude = {"lua"},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}, -- Detect tabstop and shiftwidth automatically
|
||||||
}
|
}
|
||||||
|
|||||||
7
lua/plugins/remote.lua
Normal file
7
lua/plugins/remote.lua
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
'chipsenkbeil/distant.nvim',
|
||||||
|
branch = 'v0.3',
|
||||||
|
config = function()
|
||||||
|
require('distant'):setup()
|
||||||
|
end
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user