Everything but LSP is finished!
This commit is contained in:
parent
78f04bda73
commit
e54f6ee975
23 changed files with 530 additions and 100 deletions
50
README.md
50
README.md
|
@ -37,60 +37,38 @@ rm -rf ~/.local/state/nvim
|
|||
|
||||
## NOTES/TODOS
|
||||
|
||||
FUTURE
|
||||
- Make my own session save plugin, I ONLY want window positioning/open buffers saved nothing else.
|
||||
- Make a new HTTP plugin for running curl commands from .http files
|
||||
- similar to est-nvim/rest.nvim but support streaming etc and show command output
|
||||
- Execute selected command and open output into a buffer/popup window? <leader>cx
|
||||
- generate command, like scratch open a popup of things that can be generated. UUID/other stuff?
|
||||
- https://github.com/mawkler/nvim/blob/06cde9dbaedab2bb36c06025c07589c93d2c6d6b/lua/configs/luasnip.lua#L37-L50
|
||||
|
||||
- TODO figure out tabs vs spaces thing with arrows vs bars. indent plugin...
|
||||
- Checkout cargo-bloat, cargo-cache, cargo-outdated - memcache sccache
|
||||
- For scratches, just make an input box for custom extension rather than predefined list
|
||||
- for find files, ignore git, capital F for find all
|
||||
- better copilot alternatives? Local LLM usage only? etc?
|
||||
- generate command, like scratch open a popup of things that can be generated. UUID/other stuff?
|
||||
- https://github.com/mawkler/nvim/blob/06cde9dbaedab2bb36c06025c07589c93d2c6d6b/lua/configs/luasnip.lua#L37-L50
|
||||
- TODO learn more about augroup in autocommands.
|
||||
- TODO learn more about augroup in autocommands, apply to any other auto commands I have
|
||||
- freaking learn to use surround more often https://github.com/tpope/vim-surround/tree/master
|
||||
- make my own session saving impl
|
||||
- Only save visible buffers/tabs/splits
|
||||
- per branch per directory
|
||||
- something like https://github.com/gennaro-tedesco/nvim-possession/tree/main but fully managed
|
||||
|
||||
- copilot? local llm?
|
||||
- lsp
|
||||
- null_ls replacements
|
||||
|
||||
- plugins to install:
|
||||
- uga-rosa/ccc.nvim - color picker for hex codes etc
|
||||
- zbirenbaum/copilot.lua
|
||||
- Does github's work for me now? github/copilot.vim
|
||||
- zbirenbaum/copilot-cmp
|
||||
- voldikss/vim-floaterm
|
||||
- GIT
|
||||
- lewis6991/gitsigns.nvim
|
||||
- Neogitorg/neogit ??? remove? I dont use this much...
|
||||
- kdheepak/lazygit.nvim ?? remove?
|
||||
- sindrets/diffview.nvim ? as long as this works without the above.
|
||||
- rest-nvim/rest.nvim - http curl commands
|
||||
- TODO I want a better alternative to this. One that shows streaming responses/curl as is. Can I just run curl myself easily?
|
||||
- RRethy/vim-illuminate - show token under cursor throughout file
|
||||
- lukas-reineke/indent-blankline.nvim - indent lines
|
||||
- TODO figure out tabs vs spaces thing with arrows vs bars.
|
||||
- LSP stuff... figure out from scratch using kickstart/lazynvim as an example
|
||||
- rust, ts, js, nix, lua,
|
||||
- lvimuser/lsp-inlayhints.nvim L3MON4D3/LuaSnip hrsh7th/nvim-cmp williamboman/mason.nvim folke/neodev.nvim williamboman/mason-lspconfig.nvim neovim/nvim-lspconfig simrat39/rust-tools.nvim Saecki/crates.nvim
|
||||
- how cna we do language specific tooling per project integrated with neovim here? Like different rust versions in current shell etc?
|
||||
- MASON when not nix, otherwise yes
|
||||
- lnc3l0t/glow.nvim - markdown preview
|
||||
- null_ls replacement?? need a formater replacement, diff between lsp reformat?
|
||||
- cspell? vs built in spell check?
|
||||
- Lets use https://github.com/mfussenegger/nvim-lint
|
||||
- Almo7aya/openingh.nvim
|
||||
- tpope/vim-surround
|
||||
- nvim-telescope/telescope-file-browser.nvim ?? do I want to keep this?
|
||||
- johmsalas/text-case.nvim
|
||||
- nvim-treesitter/nvim-treesitter
|
||||
- mbbill/undotree
|
||||
- nvim-lua/plenary.nvim
|
||||
- folke/which-key.nvim
|
||||
|
||||
- check out
|
||||
- https://github.com/onsails/lspkind.nvim
|
||||
- https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-align.md
|
||||
|
||||
- plugins I decided to remove from my old config
|
||||
- jinh0/eyeliner.nvim
|
||||
- David-Kunz/gen.nvim - ollama integration
|
||||
- Neogitorg/neogit ??
|
||||
- kdheepak/lazygit.nvim ??
|
||||
- null_ls
|
||||
|
|
187
flake.lock
generated
187
flake.lock
generated
|
@ -33,6 +33,22 @@
|
|||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nvim_plugin-Almo7aya/openingh.nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1710100117,
|
||||
"narHash": "sha256-xGQdEO8Fjh4Tmv5WnYJFqaitH0wZnLlbYstwqsO0Oeg=",
|
||||
"owner": "Almo7aya",
|
||||
"repo": "openingh.nvim",
|
||||
"rev": "613c18967d42202f3e2a9ac788caf62a402e7c1a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Almo7aya",
|
||||
"repo": "openingh.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim_plugin-JoosepAlviste/nvim-ts-context-commentstring": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -81,6 +97,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim_plugin-RRethy/vim-illuminate": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1713467568,
|
||||
"narHash": "sha256-o0D1edrsHkaljrzBFZXjdxiK/5ziCGJxM/kYNJgBI1E=",
|
||||
"owner": "RRethy",
|
||||
"repo": "vim-illuminate",
|
||||
"rev": "e522e0dd742a83506db0a72e1ced68c9c130f185",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "RRethy",
|
||||
"repo": "vim-illuminate",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim_plugin-catppuccin/nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -177,6 +209,86 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim_plugin-johmsalas/text-case.nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1708695777,
|
||||
"narHash": "sha256-ROvmPMB3lMeehFtL7EsHGFkE+ZD9r/ines7yDmB+7Ag=",
|
||||
"owner": "johmsalas",
|
||||
"repo": "text-case.nvim",
|
||||
"rev": "d62c63a4e9a996c7321885937ab89920fca2c1c8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "johmsalas",
|
||||
"repo": "text-case.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim_plugin-lewis6991/gitsigns.nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1714557033,
|
||||
"narHash": "sha256-IpYpya8z6e8t9Lf/ZFx97HsnVwaYLZ44D5rCKvOyybA=",
|
||||
"owner": "lewis6991",
|
||||
"repo": "gitsigns.nvim",
|
||||
"rev": "9cafac31a091267838e1e90fd6e083d37611f516",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lewis6991",
|
||||
"repo": "gitsigns.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim_plugin-lnc3l0t/glow.nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1693233815,
|
||||
"narHash": "sha256-vdlwkIK2EkFviJmSiOqPWvc15xqJ9F2gHCC4ObJ5Qjk=",
|
||||
"owner": "lnc3l0t",
|
||||
"repo": "glow.nvim",
|
||||
"rev": "5b38fb7b6e806cac62707a4aba8c10c5f14d5bb5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lnc3l0t",
|
||||
"repo": "glow.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim_plugin-lukas-reineke/indent-blankline.nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1710388427,
|
||||
"narHash": "sha256-Xp8ZQBz0in2MX3l0bnLUsSbH0lDPE+QvdmFpBFry5yY=",
|
||||
"owner": "lukas-reineke",
|
||||
"repo": "indent-blankline.nvim",
|
||||
"rev": "3d08501caef2329aba5121b753e903904088f7e6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lukas-reineke",
|
||||
"repo": "indent-blankline.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim_plugin-mbbill/undotree": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1713305700,
|
||||
"narHash": "sha256-UIroW89ALMRdxSkNGU2VPeuXJxR+25wJ+AakRcjwx/s=",
|
||||
"owner": "mbbill",
|
||||
"repo": "undotree",
|
||||
"rev": "56c684a805fe948936cda0d1b19505b84ad7e065",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "mbbill",
|
||||
"repo": "undotree",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim_plugin-nvim-lua/plenary.nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -337,6 +449,70 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim_plugin-sindrets/diffview.nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1700506468,
|
||||
"narHash": "sha256-3EdnBUka9Rh5Brl6TWpN6GlD9z32mmY3Ip+wyiKob/8=",
|
||||
"owner": "sindrets",
|
||||
"repo": "diffview.nvim",
|
||||
"rev": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "sindrets",
|
||||
"repo": "diffview.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim_plugin-tpope/vim-surround": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1666730476,
|
||||
"narHash": "sha256-DZE5tkmnT+lAvx/RQHaDEgEJXRKsy56KJY919xiH1lE=",
|
||||
"owner": "tpope",
|
||||
"repo": "vim-surround",
|
||||
"rev": "3d188ed2113431cf8dac77be61b842acb64433d9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tpope",
|
||||
"repo": "vim-surround",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim_plugin-uga-rosa/ccc.nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1714299582,
|
||||
"narHash": "sha256-QRq9hQF5vLnOTzQGbOWC2ykMdMsQDlDlb6XC17dJG7Q=",
|
||||
"owner": "uga-rosa",
|
||||
"repo": "ccc.nvim",
|
||||
"rev": "f388f1981d222967c741fe9927edf9ba5fa3bcbe",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "uga-rosa",
|
||||
"repo": "ccc.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim_plugin-voldikss/vim-floaterm": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1712535773,
|
||||
"narHash": "sha256-wIgcBcdxJsT+qrsC5Boj6hp0xpp5gFeQFhK7yyC5a1o=",
|
||||
"owner": "voldikss",
|
||||
"repo": "vim-floaterm",
|
||||
"rev": "4e28c8dd0271e10a5f55142fb6fe9b1599ee6160",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "voldikss",
|
||||
"repo": "vim-floaterm",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim_plugin-windwp/nvim-ts-autotag": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -357,15 +533,22 @@
|
|||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nvim_plugin-Almo7aya/openingh.nvim": "nvim_plugin-Almo7aya/openingh.nvim",
|
||||
"nvim_plugin-JoosepAlviste/nvim-ts-context-commentstring": "nvim_plugin-JoosepAlviste/nvim-ts-context-commentstring",
|
||||
"nvim_plugin-MunifTanjim/nui.nvim": "nvim_plugin-MunifTanjim/nui.nvim",
|
||||
"nvim_plugin-Pocco81/auto-save.nvim": "nvim_plugin-Pocco81/auto-save.nvim",
|
||||
"nvim_plugin-RRethy/vim-illuminate": "nvim_plugin-RRethy/vim-illuminate",
|
||||
"nvim_plugin-catppuccin/nvim": "nvim_plugin-catppuccin/nvim",
|
||||
"nvim_plugin-chrisgrieser/nvim-early-retirement": "nvim_plugin-chrisgrieser/nvim-early-retirement",
|
||||
"nvim_plugin-declancm/cinnamon.nvim": "nvim_plugin-declancm/cinnamon.nvim",
|
||||
"nvim_plugin-folke/lazy.nvim": "nvim_plugin-folke/lazy.nvim",
|
||||
"nvim_plugin-folke/noice.nvim": "nvim_plugin-folke/noice.nvim",
|
||||
"nvim_plugin-folke/which-key.nvim": "nvim_plugin-folke/which-key.nvim",
|
||||
"nvim_plugin-johmsalas/text-case.nvim": "nvim_plugin-johmsalas/text-case.nvim",
|
||||
"nvim_plugin-lewis6991/gitsigns.nvim": "nvim_plugin-lewis6991/gitsigns.nvim",
|
||||
"nvim_plugin-lnc3l0t/glow.nvim": "nvim_plugin-lnc3l0t/glow.nvim",
|
||||
"nvim_plugin-lukas-reineke/indent-blankline.nvim": "nvim_plugin-lukas-reineke/indent-blankline.nvim",
|
||||
"nvim_plugin-mbbill/undotree": "nvim_plugin-mbbill/undotree",
|
||||
"nvim_plugin-nvim-lua/plenary.nvim": "nvim_plugin-nvim-lua/plenary.nvim",
|
||||
"nvim_plugin-nvim-lualine/lualine.nvim": "nvim_plugin-nvim-lualine/lualine.nvim",
|
||||
"nvim_plugin-nvim-telescope/telescope-fzf-native.nvim": "nvim_plugin-nvim-telescope/telescope-fzf-native.nvim",
|
||||
|
@ -376,6 +559,10 @@
|
|||
"nvim_plugin-preservim/nerdcommenter": "nvim_plugin-preservim/nerdcommenter",
|
||||
"nvim_plugin-rcarriga/nvim-notify": "nvim_plugin-rcarriga/nvim-notify",
|
||||
"nvim_plugin-rmagatti/auto-session": "nvim_plugin-rmagatti/auto-session",
|
||||
"nvim_plugin-sindrets/diffview.nvim": "nvim_plugin-sindrets/diffview.nvim",
|
||||
"nvim_plugin-tpope/vim-surround": "nvim_plugin-tpope/vim-surround",
|
||||
"nvim_plugin-uga-rosa/ccc.nvim": "nvim_plugin-uga-rosa/ccc.nvim",
|
||||
"nvim_plugin-voldikss/vim-floaterm": "nvim_plugin-voldikss/vim-floaterm",
|
||||
"nvim_plugin-windwp/nvim-ts-autotag": "nvim_plugin-windwp/nvim-ts-autotag"
|
||||
}
|
||||
},
|
||||
|
|
46
flake.nix
46
flake.nix
|
@ -87,6 +87,50 @@
|
|||
url = "github:nvim-tree/nvim-tree.lua";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-uga-rosa/ccc.nvim" = {
|
||||
url = "github:uga-rosa/ccc.nvim";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-voldikss/vim-floaterm" = {
|
||||
url = "github:voldikss/vim-floaterm";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-lewis6991/gitsigns.nvim" = {
|
||||
url = "github:lewis6991/gitsigns.nvim";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-sindrets/diffview.nvim" = {
|
||||
url = "github:sindrets/diffview.nvim";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-RRethy/vim-illuminate" = {
|
||||
url = "github:RRethy/vim-illuminate";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-lukas-reineke/indent-blankline.nvim" = {
|
||||
url = "github:lukas-reineke/indent-blankline.nvim";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-lnc3l0t/glow.nvim" = {
|
||||
url = "github:lnc3l0t/glow.nvim";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-Almo7aya/openingh.nvim" = {
|
||||
url = "github:Almo7aya/openingh.nvim";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-tpope/vim-surround" = {
|
||||
url = "github:tpope/vim-surround";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-johmsalas/text-case.nvim" = {
|
||||
url = "github:johmsalas/text-case.nvim";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-mbbill/undotree" = {
|
||||
url = "github:mbbill/undotree";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils, ... } @ inputs:
|
||||
|
@ -120,7 +164,7 @@
|
|||
fzf # search fuzzy
|
||||
# curl # http requests
|
||||
tree-sitter
|
||||
# glow # markdown renderer
|
||||
glow # markdown renderer
|
||||
# nodePackages.cspell
|
||||
];
|
||||
in
|
||||
|
|
1
init.lua
1
init.lua
|
@ -78,6 +78,7 @@ require("lazy").setup({
|
|||
change_detection = {
|
||||
enabled = false,
|
||||
},
|
||||
|
||||
defaults = {
|
||||
lazy = true,
|
||||
},
|
||||
|
|
|
@ -9,44 +9,25 @@ vim.api.nvim_create_autocmd("TextYankPost", {
|
|||
end,
|
||||
})
|
||||
|
||||
--function isEmpty()
|
||||
--return vim.api.nvim_buf_get_name(0) == ""
|
||||
--or vim.fn.filereadable(vim.api.nvim_buf_get_name(0)) == 0
|
||||
--or vim.fn.line("$") == 1 and vim.fn.col("$") == 1
|
||||
--end
|
||||
|
||||
--vim.api.nvim_create_autocmd({ "VimEnter" }, {
|
||||
-- callback = function()
|
||||
-- if isEmpty() then
|
||||
-- require('telescope.builtin').find_files()
|
||||
-- end
|
||||
-- end
|
||||
--})
|
||||
|
||||
-- TODO is there a better way for these?
|
||||
vim.api.nvim_create_autocmd("BufRead", {
|
||||
pattern = ".env*",
|
||||
command = "set filetype=sh",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("BufRead", {
|
||||
pattern = ".*rc",
|
||||
command = "set filetype=sh",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("BufRead", {
|
||||
pattern = "Dockerfile.*",
|
||||
command = "set filetype=dockerfile",
|
||||
})
|
||||
vim.api.nvim_create_autocmd("BufRead", {
|
||||
pattern = "*.http",
|
||||
command = "set filetype=http",
|
||||
})
|
||||
|
||||
if vim.fn.exists(":CccHighlighterEnable") ~= 0 then
|
||||
vim.api.nvim_create_autocmd("BufRead", {
|
||||
callback = function()
|
||||
vim.cmd.CccHighlighterEnable()
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
-- AUto exit insert mode whenever we switch screens
|
||||
-- Auto exit insert mode whenever we switch screens
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
|
||||
callback = function()
|
||||
if vim.bo.filetype ~= "TelescopePrompt" and vim.bo.filetype ~= nil and vim.bo.filetype ~= "" then
|
||||
|
@ -55,18 +36,6 @@ vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
|
|||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufEnter" }, {
|
||||
pattern = "*.http",
|
||||
command = "set filetype=http",
|
||||
})
|
||||
|
||||
--vim.api.nvim_create_autocmd('BufEnter', {
|
||||
-- callback = function ()
|
||||
-- local ts_avail, parsers = pcall(require, "nvim-treesitter.parsers")
|
||||
-- if ts_avail and parsers.has_parser() then vim.cmd.TSBufEnable "highlight" end
|
||||
-- end,
|
||||
--})
|
||||
|
||||
vim.api.nvim_create_autocmd("VimLeavePre", {
|
||||
callback = function()
|
||||
vim.cmd("NvimTreeClose")
|
||||
|
|
|
@ -22,23 +22,23 @@ U.keymaps({
|
|||
{ ";", ":", desc = "No shift to enter command mode with semicolon. Alias ; to :", mode = nvx },
|
||||
{ "<leader>Q", "<nop>", mode = nvx }, -- don't do normal Q quit
|
||||
{ "<leader>a", "<esc>ggVG", desc = "Select all", mode = nvx },
|
||||
{ "Q", "<cmd>qa<CR>", desc = "Quit all", mode = nvx },
|
||||
{ "Q", "<cmd>SessionSave<cr><cmd>qa!<cr>", desc = "Quit all", mode = nvx },
|
||||
{ "<leader>y", '"+y', desc = "Copy to system clipboard", mode = nvx },
|
||||
{ "<leader>p", '"+p', desc = "Paste from system clipboard", mode = nvx },
|
||||
{ "<esc>", "<cmd>nohlsearch<CR><esc>", desc = "Clear search on escape" },
|
||||
{ "<return>", "<cmd>nohlsearch<CR><return>", desc = "Clear search on return" },
|
||||
{ "<esc>", "<cmd>nohlsearch<cr><esc>", desc = "Clear search on escape" },
|
||||
{ "<return>", "<cmd>nohlsearch<cr><return>", desc = "Clear search on return" },
|
||||
{ "|", "<cmd>vsplit<cr>", desc = "Vertical Split" },
|
||||
{ "\\", "<cmd>split<cr>", desc = "Horizontal Split" },
|
||||
{ "<S-Tab>", "<C-o>", desc = "Go back <C-o>" },
|
||||
{
|
||||
"J",
|
||||
":m '>+1<CR>gv=gv",
|
||||
":m '>+1<cr>gv=gv",
|
||||
desc = "Visually move block down",
|
||||
mode = "v",
|
||||
},
|
||||
{
|
||||
"K",
|
||||
":m '<-2<CR>gv=gv",
|
||||
":m '<-2<cr>gv=gv",
|
||||
desc = "Visually move block up",
|
||||
mode = "v",
|
||||
},
|
||||
|
@ -53,7 +53,7 @@ U.keymaps({
|
|||
-- * if non empty buffer, we will simply open a new empty buffer unless
|
||||
-- it is in the close always list
|
||||
-- * if empty buffer, then we will quit this buffer
|
||||
local close_always = { "quickfix", "help", "nofile" }
|
||||
local close_always = { "quickfix", "help", "nofile", "httpResult" }
|
||||
if
|
||||
U.table_contains(close_always, vim.bo.buftype)
|
||||
or (vim.api.nvim_buf_line_count(0) == 1 and vim.api.nvim_buf_get_lines(0, 0, 1, -1)[1] == "")
|
||||
|
|
|
@ -27,6 +27,9 @@ vim.opt.hlsearch = false
|
|||
-- Wrap lines in files
|
||||
vim.opt.wrap = true
|
||||
|
||||
-- Keep signcolumn on by default
|
||||
vim.opt.signcolumn = "yes"
|
||||
|
||||
-- preseve indentation of virtual wrapped lines
|
||||
vim.opt.breakindent = true
|
||||
|
||||
|
@ -49,7 +52,7 @@ vim.opt.undofile = true
|
|||
-- See `:help 'list'`
|
||||
-- and `:help 'listchars'`
|
||||
vim.opt.list = true
|
||||
vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "␣" }
|
||||
vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "␣", eol = "↴" }
|
||||
-- TODO REVISIT IF I WANT THESE
|
||||
|
||||
-- Search settings
|
||||
|
|
16
lua/plugins/color_picker.lua
Normal file
16
lua/plugins/color_picker.lua
Normal file
|
@ -0,0 +1,16 @@
|
|||
return {
|
||||
"uga-rosa/ccc.nvim",
|
||||
event = "BufEnter",
|
||||
opts = { auto_enable = true, lsp = true, point_char = "" },
|
||||
config = function(_, opts)
|
||||
require("ccc").setup(opts)
|
||||
vim.api.nvim_create_autocmd("BufRead", {
|
||||
callback = function()
|
||||
vim.cmd.CccHighlighterEnable()
|
||||
end,
|
||||
})
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>,p", "<cmd>CccPick<cr>", desc = "Color Picker", mode = { "n", "v", "x" } },
|
||||
},
|
||||
}
|
|
@ -21,6 +21,6 @@ return {
|
|||
vim.cmd("filetype plugin on")
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>/", "<Plug>NERDCommenterToggle<cr>k", mode = { "n", "x" } },
|
||||
{ "<leader>/", "<Plug>NERDCommenterToggle<cr>k", mode = { "n", "x" }, desc = "Toggle comments on line/selection" },
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
-- TODO checkout https://github.com/nvim-lua/lsp-status.nvim
|
||||
-- https://www.reddit.com/r/neovim/comments/o4bguk/comment/h2kcjxa/
|
||||
local function lsp_clients()
|
||||
local clients = {}
|
||||
for _, client in pairs(vim.lsp.buf_get_clients(0)) do
|
||||
|
@ -32,16 +33,23 @@ local function langs()
|
|||
return table.concat(l, " • "), " "
|
||||
end
|
||||
|
||||
local function latest_message()
|
||||
return U.safeRequire("noice", function(n)
|
||||
return n.api.status.message.get_hl
|
||||
end, U.fnEmptyStr)
|
||||
end
|
||||
local last_blame = nil
|
||||
local last_blame_time = vim.loop.now()
|
||||
local function gitblame()
|
||||
local d = vim.b.gitsigns_blame_line_dict
|
||||
|
||||
local function latest_message_cond()
|
||||
return U.safeRequire("noice", function(n)
|
||||
return n.api.status.message.has
|
||||
end, U.fnFalse)
|
||||
if d then
|
||||
last_blame = d
|
||||
last_blame_time = vim.loop.now()
|
||||
elseif vim.loop.now() - last_blame_time <= 2000 then
|
||||
d = last_blame
|
||||
end
|
||||
|
||||
if d then
|
||||
local ok, res = pcall(os.date, "%d %b %y", d.committer_time)
|
||||
return d.committer .. " - " .. (ok and res or d.committer_time)
|
||||
end
|
||||
return ""
|
||||
end
|
||||
|
||||
return {
|
||||
|
@ -61,7 +69,7 @@ return {
|
|||
lualine_c = {
|
||||
{ "filename", separator = { right = "" } },
|
||||
{ "reg_recording", icon = { "" }, color = { fg = "#D37676" } },
|
||||
{ latest_message, cond = latest_message_cond },
|
||||
{ gitblame, color = { fg = "#696969" } },
|
||||
},
|
||||
lualine_x = {
|
||||
lsp_clients,
|
||||
|
|
12
lua/plugins/floatterm.lua
Normal file
12
lua/plugins/floatterm.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
return {
|
||||
"voldikss/vim-floaterm",
|
||||
cmd = { "FloatermToggle" },
|
||||
keys = {
|
||||
{
|
||||
"<C-x>",
|
||||
"<cmd>FloatermToggle<cr>",
|
||||
desc = "Toggle float terminal",
|
||||
mode = { "n", "i", "v", "x", "c", "t" },
|
||||
},
|
||||
},
|
||||
}
|
53
lua/plugins/git_diff.lua
Normal file
53
lua/plugins/git_diff.lua
Normal file
|
@ -0,0 +1,53 @@
|
|||
return {
|
||||
"sindrets/diffview.nvim",
|
||||
opts = {
|
||||
diff_binaries = false,
|
||||
enhanced_diff_hl = true,
|
||||
git_cmd = { "git" },
|
||||
use_icons = true,
|
||||
icons = {
|
||||
folder_closed = "",
|
||||
folder_open = "",
|
||||
},
|
||||
signs = {
|
||||
fold_closed = "",
|
||||
fold_open = "",
|
||||
},
|
||||
view = {
|
||||
merge_tool = {
|
||||
layout = "diff3_mixed",
|
||||
disable_diagnostics = true,
|
||||
},
|
||||
},
|
||||
file_panel = {
|
||||
listing_style = "tree",
|
||||
tree_options = {
|
||||
flatten_dirs = true,
|
||||
folder_statuses = "only_folded",
|
||||
},
|
||||
win_config = {
|
||||
position = "left",
|
||||
width = 35,
|
||||
},
|
||||
},
|
||||
file_history_panel = {
|
||||
log_options = {
|
||||
git = {
|
||||
single_file = {
|
||||
diff_merges = "combined",
|
||||
},
|
||||
multi_file = {
|
||||
diff_merges = "first-parent",
|
||||
},
|
||||
},
|
||||
},
|
||||
win_config = {
|
||||
position = "bottom",
|
||||
height = 16,
|
||||
},
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>gd", "<cmd>DiffviewOpen<cr>", desc = "Opens git diff view." },
|
||||
},
|
||||
}
|
35
lua/plugins/git_signs.lua
Normal file
35
lua/plugins/git_signs.lua
Normal file
|
@ -0,0 +1,35 @@
|
|||
return {
|
||||
"lewis6991/gitsigns.nvim",
|
||||
event = "BufEnter",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
opts = function()
|
||||
local highlight = U.highlight
|
||||
highlight("GitGutterAdd", { fg = "#688066", gui = "nocombine" })
|
||||
highlight("GitGutterUntracked", { fg = "#688066", gui = "nocombine" })
|
||||
highlight("GitGutterChange", { fg = "#666f80", gui = "nocombine" })
|
||||
highlight("GitGutterDelete", { fg = "#806666", gui = "nocombine" })
|
||||
highlight("GitGutterChangeDelete", { fg = "#806666", gui = "nocombine" })
|
||||
|
||||
return {
|
||||
watch_gitdir = {
|
||||
interval = 100,
|
||||
},
|
||||
signs = {
|
||||
add = { hl = "GitGutterAdd" },
|
||||
change = { hl = "GitGutterChange" },
|
||||
delete = { hl = "GitGutterDelete" },
|
||||
topdelete = { hl = "GitGutterDelete" },
|
||||
changedelete = { hl = "GitGutterChangeDelete" },
|
||||
untracked = { hl = "GitGutterUntracked" },
|
||||
},
|
||||
current_line_blame = true,
|
||||
current_line_blame_opts = {
|
||||
delay = 0,
|
||||
virt_text = false,
|
||||
},
|
||||
}
|
||||
end,
|
||||
config = function(_, opts)
|
||||
require("gitsigns").setup(opts)
|
||||
end,
|
||||
}
|
9
lua/plugins/github_open.lua
Normal file
9
lua/plugins/github_open.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
return {
|
||||
"Almo7aya/openingh.nvim",
|
||||
cmd = { "OpenInGHFile", "OpenInGHFileLines" },
|
||||
keys = {
|
||||
{ "<leader>gf", "<cmd>OpenInGHFile<CR>", desc = "Open in git" },
|
||||
{ "<leader>gf", ":OpenInGHFileLines<CR>", desc = "Open in git", mode = { "v", "x" } },
|
||||
},
|
||||
}
|
||||
|
9
lua/plugins/illuminate.lua
Normal file
9
lua/plugins/illuminate.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
-- This plugin will smartly highlight the token under the cursor.
|
||||
return {
|
||||
"RRethy/vim-illuminate",
|
||||
event = "VeryLazy",
|
||||
opts = {},
|
||||
config = function(_, opts)
|
||||
require("illuminate").configure(opts)
|
||||
end,
|
||||
}
|
49
lua/plugins/indent_indicators.lua
Normal file
49
lua/plugins/indent_indicators.lua
Normal file
|
@ -0,0 +1,49 @@
|
|||
return {
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
scope = {
|
||||
enabled = true,
|
||||
char = "┊",
|
||||
show_start = false,
|
||||
show_end = false,
|
||||
highlight = {
|
||||
"IndentBlanklineScope1",
|
||||
"IndentBlanklineScope2",
|
||||
"IndentBlanklineScope3",
|
||||
"IndentBlanklineScope4",
|
||||
"IndentBlanklineScope5",
|
||||
},
|
||||
},
|
||||
indent = {
|
||||
char = "│",
|
||||
highlight = {
|
||||
"IndentBlanklineIndent1",
|
||||
"IndentBlanklineIndent2",
|
||||
"IndentBlanklineIndent3",
|
||||
"IndentBlanklineIndent4",
|
||||
"IndentBlanklineIndent5",
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
U.highlight("NonText", { fg = "#303030", gui = "nocombine" })
|
||||
|
||||
local hooks = require("ibl.hooks")
|
||||
hooks.register(hooks.type.HIGHLIGHT_SETUP, function()
|
||||
vim.api.nvim_set_hl(0, "IndentBlanklineIndent1", { fg = "#915053" })
|
||||
vim.api.nvim_set_hl(0, "IndentBlanklineIndent2", { fg = "#A27F3E" })
|
||||
vim.api.nvim_set_hl(0, "IndentBlanklineIndent3", { fg = "#6B7F6E" })
|
||||
vim.api.nvim_set_hl(0, "IndentBlanklineIndent4", { fg = "#5a74aa" })
|
||||
vim.api.nvim_set_hl(0, "IndentBlanklineIndent5", { fg = "#6B6282" })
|
||||
|
||||
vim.api.nvim_set_hl(0, "IndentBlanklineScope1", { fg = "#CB5D60" })
|
||||
vim.api.nvim_set_hl(0, "IndentBlanklineScope2", { fg = "#DEA93F" })
|
||||
vim.api.nvim_set_hl(0, "IndentBlanklineScope3", { fg = "#89B790" })
|
||||
vim.api.nvim_set_hl(0, "IndentBlanklineScope4", { fg = "#6289E5" })
|
||||
vim.api.nvim_set_hl(0, "IndentBlanklineScope5", { fg = "#917DC0" })
|
||||
end)
|
||||
|
||||
require("ibl").setup(opts)
|
||||
end,
|
||||
}
|
10
lua/plugins/markdown_glow.lua
Normal file
10
lua/plugins/markdown_glow.lua
Normal file
|
@ -0,0 +1,10 @@
|
|||
return {
|
||||
"lnc3l0t/glow.nvim",
|
||||
opts = {
|
||||
default_type = "keep",
|
||||
},
|
||||
cmd = "Glow",
|
||||
keys = {
|
||||
{ "<leader>,m", "<cmd>Glow<cr>", desc = "Markdown preview" },
|
||||
},
|
||||
}
|
|
@ -2,7 +2,7 @@ return {
|
|||
"rmagatti/auto-session",
|
||||
lazy = false,
|
||||
init = function()
|
||||
vim.o.sessionoptions = "blank,buffers,curdir,folds,tabpages,winsize,winpos,terminal,localoptions"
|
||||
vim.o.sessionoptions = "blank,buffers,curdir,folds,tabpages,winsize,winpos,terminal"
|
||||
end,
|
||||
opts = {
|
||||
auto_session_use_git_branch = true,
|
||||
|
|
4
lua/plugins/surround.lua
Normal file
4
lua/plugins/surround.lua
Normal file
|
@ -0,0 +1,4 @@
|
|||
return {
|
||||
"tpope/vim-surround",
|
||||
event = "VeryLazy",
|
||||
}
|
25
lua/plugins/text_case.lua
Normal file
25
lua/plugins/text_case.lua
Normal file
|
@ -0,0 +1,25 @@
|
|||
return {
|
||||
"johmsalas/text-case.nvim",
|
||||
dependencies = { "nvim-telescope/telescope.nvim" },
|
||||
cmd = "TextCaseOpenTelescope",
|
||||
config = function(_, opts)
|
||||
require("textcase").setup(opts)
|
||||
require("telescope").load_extension("textcase")
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"<leader>,c",
|
||||
function()
|
||||
if next(vim.lsp.buf_get_clients()) ~= nil then
|
||||
-- TODO test that this works
|
||||
vim.cmd("TextCaseOpenTelescopeLSPChange")
|
||||
else
|
||||
vim.cmd("TextCaseOpenTelescope")
|
||||
end
|
||||
end,
|
||||
desc = "Change case of selection",
|
||||
mode = { "n", "v", "x" },
|
||||
silent = true, -- TODO add this to most things....
|
||||
},
|
||||
},
|
||||
}
|
6
lua/plugins/undotree.lua
Normal file
6
lua/plugins/undotree.lua
Normal file
|
@ -0,0 +1,6 @@
|
|||
return {
|
||||
"mbbill/undotree",
|
||||
keys = {
|
||||
{ "<leader>u", vim.cmd.UndotreeToggle, desc = "Undo Tree Toggle" },
|
||||
},
|
||||
}
|
|
@ -15,15 +15,15 @@ return {
|
|||
local wk = require("which-key")
|
||||
wk.setup(opts)
|
||||
wk.register({
|
||||
["<leader>b"] = { name = "Buffers" },
|
||||
["<leader>t"] = { name = "Tabs" },
|
||||
-- ["<leader>,"] = { name = "Miscellaneous Tools" },
|
||||
["<leader>b"] = { name = "Buffers", mode = { "n", "x", "v", "c" } },
|
||||
["<leader>t"] = { name = "Tabs", mode = { "n", "x", "v", "c" } },
|
||||
["<leader>,"] = { name = "Miscellaneous Tools", mode = { "n", "x", "v", "c" } },
|
||||
-- ["<leader>c"] = { name = "Copilot" },
|
||||
["<leader>f"] = { name = "Find [Telescope]" },
|
||||
["<leader>f"] = { name = "Find [Telescope]", mode = { "n", "x", "v", "c" } },
|
||||
-- ["<leader>fs"] = { name = "Find in Scratches [Telescope]" },
|
||||
-- ["<leader>g"] = { name = "Git" },
|
||||
["<leader>l"] = { name = "LSP" },
|
||||
["<leader>lf"] = { name = "LSP Find" },
|
||||
["<leader>g"] = { name = "Git", mode = { "n", "x", "v", "c" } },
|
||||
["<leader>l"] = { name = "LSP", mode = { "n", "x", "v", "c" } },
|
||||
["<leader>lf"] = { name = "LSP Find", mode = { "n", "x", "v", "c" } },
|
||||
-- ["<leader>Q"] = { name = "+Q Quit and remove session" },
|
||||
-- ["<leader>s"] = { name = "Scratch Files" },
|
||||
-- ["<leader>x"] = { name = "Generative AI, Ollama" },
|
||||
|
|
12
lua/util.lua
12
lua/util.lua
|
@ -128,6 +128,18 @@ function M.safeRequire(module, func, errorFunc)
|
|||
return nil
|
||||
end
|
||||
|
||||
-- TODO remove if not needed
|
||||
-- local startup_time = vim.loop.now()
|
||||
-- function M.delayFromStartup(delay, func)
|
||||
-- local current_time = vim.loop.now()
|
||||
-- local diff = current_time - startup_time
|
||||
-- if diff >= delay then
|
||||
-- func()
|
||||
-- else
|
||||
-- vim.defer_fn(func, (delay - diff))
|
||||
-- end
|
||||
-- end
|
||||
|
||||
function M.fnFalse()
|
||||
return false
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue