mirror of
https://github.com/boxpositron/absolute-vim.git
synced 2026-10-24 13:33:18 +00:00
Compare commits
180 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fa59b7988c | |||
| 5f86592ed4 | |||
| 318c2a2421 | |||
| 7e033dc750 | |||
| da52a830f6 | |||
| b235a80f10 | |||
| 43c3a7ce37 | |||
| 5631e845d1 | |||
| a101cf5e0c | |||
| 7ac3d90843 | |||
| d74c40a9af | |||
| a8403da735 | |||
| 3be2e4f344 | |||
| 3f70665f56 | |||
| 93d89bef5b | |||
| 38dfc79f02 | |||
| c05651f3b2 | |||
| db3b05721a | |||
| c4d1bc9809 | |||
| c25f8963ba | |||
| 424dcf0028 | |||
| 4b6c92e7ed | |||
| e633db4e7e | |||
| 2feb9797f7 | |||
| e13ee7edbd | |||
| c39c7a7556 | |||
| 162ce343bd | |||
| 750a2169b1 | |||
| 740dbe9f7d | |||
| 30144c8a48 | |||
| 50dd3df42a | |||
| 4027c62264 | |||
| 939227fdc8 | |||
| 42de4a6ad7 | |||
| 97c0e26c5b | |||
| bd3f2df13a | |||
| 91bab15767 | |||
| a322834154 | |||
| 2e5c3a7f35 | |||
| b1737abd9d | |||
| 7c652b6995 | |||
| a3f904b2da | |||
| 647acfb687 | |||
| 5060d0b816 | |||
| 2b7ce8f520 | |||
| a96a4f719e | |||
| 5a617aeaff | |||
| 41fb4776df | |||
| 36a4939eb2 | |||
| 0241ccc827 | |||
| bacfe5981e | |||
| 5e7ffa698a | |||
| e86c79c0f4 | |||
| a36964cd5c | |||
| bbda0a7757 | |||
| 7ab0dd47a5 | |||
| 2312facd84 | |||
| d01a343ff5 | |||
| b202796340 | |||
| db5156be5a | |||
| 730b62e1da | |||
| b5d1df5dc5 | |||
| 3e9289046f | |||
| 99579eeab9 | |||
| ef623f83ad | |||
| 77340c5dcf | |||
| 67e1efba83 | |||
| c22561d18e | |||
| 347718979c | |||
| 7caf5d4241 | |||
| 153a3f538e | |||
| 8ab0ebd57e | |||
| 9f5022b61b | |||
| 7b78ace466 | |||
| f546a66847 | |||
| 5979833c16 | |||
| 8f31e19160 | |||
| 6ca986870d | |||
| e875cdcf4b | |||
| 4ddb4399ab | |||
| 193672949d | |||
| c0200d8a4d | |||
| d811b3e73f | |||
| e625999f55 | |||
| 6bf7c84173 | |||
| 282abdbd7e | |||
| d83d223161 | |||
| db4b8ad12c | |||
| 6afb379fad | |||
| 2bace8525a | |||
| c8b30a453e | |||
| 3ff0245770 | |||
| e8e96fa782 | |||
| 884fc44344 | |||
| 696ba76d07 | |||
| de887bc275 | |||
| 1c57efd8cb | |||
| 260aff8ebf | |||
| 30c2b464e0 | |||
| 6fba1ca3f1 | |||
| e328a43453 | |||
| 69319e52c5 | |||
| 49f2e99f83 | |||
| d463bfcde0 | |||
| c4e74ff5e1 | |||
| ba39d9bfe4 | |||
| dcabac3a07 | |||
| dce8aaa3bc | |||
| d7f4bb752f | |||
| 470940593f | |||
| 50368bc5c7 | |||
| b26965f4d2 | |||
| 7528b01bfa | |||
| 55edad9ed6 | |||
| bfcd015867 | |||
| 15246a74ab | |||
| bbc43f98ee | |||
| 213a312bed | |||
| a0d0658a16 | |||
| bce7208644 | |||
| 0900427b05 | |||
| 5d326673e0 | |||
| 0dd38ef0ca | |||
| d4a82e867f | |||
| 850814d169 | |||
| 41e667d58a | |||
| 246291ed8c | |||
| 4bc3130791 | |||
| 8712e379c4 | |||
| be4db2a984 | |||
| 5cceac51e0 | |||
| 707bc2a204 | |||
| 7d4ee66a33 | |||
| 8abbd568e5 | |||
| ae7209b8d0 | |||
| 197dbab5d2 | |||
| 2f81b9e3f7 | |||
| 8c04ed3ff7 | |||
| e901890e97 | |||
| 0499526c85 | |||
| 57a1accde5 | |||
| 823b4f8900 | |||
| 71a08f4097 | |||
| 90154b6967 | |||
| 2342ae3f1b | |||
| 0a16978543 | |||
| dfbe7acbc4 | |||
| 4f0f762caa | |||
| adc0e7d95c | |||
| 4273043666 | |||
| de2237fb2c | |||
| 286a2f7ebe | |||
| 4591540449 | |||
| 7834005138 | |||
| 7b75e5058b | |||
| cba7ae9980 | |||
| 7aa69de8a8 | |||
| 2a47d47b8b | |||
| 80f7dcf1e9 | |||
| 75a58a2d0b | |||
| 3277805e69 | |||
| 1305a943a1 | |||
| 5c953ee2ac | |||
| 979f229157 | |||
| 3e331e02b6 | |||
| 159b0e0b68 | |||
| 348d2904d6 | |||
| 8a786d0420 | |||
| a57fdb2201 | |||
| 68aba67294 | |||
| aee290dcf9 | |||
| 6aa492bca8 | |||
| 68421c4615 | |||
| 589ab57da2 | |||
| 6d7c3de411 | |||
| 50b968ed9d | |||
| 923265371f | |||
| 4e36594907 | |||
| e454b4a8b9 | |||
| 2537f12e0c |
@@ -1,2 +0,0 @@
|
|||||||
python 3.11.0
|
|
||||||
nodejs 20.0.0
|
|
||||||
@@ -2,8 +2,9 @@
|
|||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
VIM Configurations for the modern developer. This configuration is designed to be efficient for my personal workflow. It is designed to be minimalistic and easy to use.
|
Here's the VIM configuration I'm going to be using for most of my professional work this year.
|
||||||
|
There may be changes as I discover new plugins. I intent to personalize this to my taste and
|
||||||
|
coding conventions. Feel free to try it out if you fancy 😄.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@@ -34,5 +35,47 @@ git clone https://github.com/boxpositron/absolute-vim ~/.config/nvim --depth 1 &
|
|||||||
- [Noto Emoji](https://fonts.google.com/noto/specimen/Noto+Emoji)
|
- [Noto Emoji](https://fonts.google.com/noto/specimen/Noto+Emoji)
|
||||||
- [JetBrains Mono](https://fonts.google.com/specimen/JetBrains+Mono)
|
- [JetBrains Mono](https://fonts.google.com/specimen/JetBrains+Mono)
|
||||||
|
|
||||||
|
### Themes
|
||||||
|
|
||||||
Work in progress...
|
- [Tokyonight](https://github.com/folke/tokyonight.nvim)
|
||||||
|
|
||||||
|
### Plugins
|
||||||
|
|
||||||
|
- [CheatSheet](https://github.com/sudormrfbin/cheatsheet.nvim)
|
||||||
|
- [Comment](https://github.com/numToStr/Comment.nvim)
|
||||||
|
- DAP
|
||||||
|
- Dashboard
|
||||||
|
- GitIgnore
|
||||||
|
- GitSigns
|
||||||
|
- Harpoon
|
||||||
|
- Incline
|
||||||
|
- IndentBlankline
|
||||||
|
- Jedi
|
||||||
|
- KeySeer
|
||||||
|
- LuaLine
|
||||||
|
- Mason
|
||||||
|
- Mini
|
||||||
|
- NoneLS
|
||||||
|
- NvimBQF
|
||||||
|
- NvimCMP
|
||||||
|
- NvimSilicon
|
||||||
|
- NvimSurround
|
||||||
|
- NvimTree
|
||||||
|
- NvimTreesitter
|
||||||
|
- PoetV
|
||||||
|
- SuperTab
|
||||||
|
- TailwindSorter
|
||||||
|
- Telescope
|
||||||
|
- TodoComments
|
||||||
|
- ToggleTerm
|
||||||
|
- TreeSJ
|
||||||
|
- Trouble
|
||||||
|
- UndoTree
|
||||||
|
|
||||||
|
## Keybindings
|
||||||
|
|
||||||
|
### General
|
||||||
|
|
||||||
|
| Keybinding | Description |
|
||||||
|
|
||||||
|
|------------|-------------|
|
||||||
|
|||||||
+62
-71
@@ -1,78 +1,69 @@
|
|||||||
{
|
{
|
||||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||||
"LuaSnip": { "branch": "master", "commit": "831a130291eb6dae0dabd2748d0a99401a2eebc4" },
|
"LuaSnip": { "branch": "master", "commit": "e808bee352d1a6fcf902ca1a71cee76e60e24071" },
|
||||||
"catppuccin": { "branch": "main", "commit": "fa42eb5e26819ef58884257d5ae95dd0552b9a66" },
|
"catppuccin": { "branch": "main", "commit": "63685e1562ef53873c9764b483d7ac5c7a608922" },
|
||||||
"cheatsheet.nvim": { "branch": "master", "commit": "9716f9aaa94dd1fd6ce59b5aae0e5f25e2a463ef" },
|
"cheatsheet.nvim": { "branch": "master", "commit": "9716f9aaa94dd1fd6ce59b5aae0e5f25e2a463ef" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||||
"cmp-cmdline": { "branch": "main", "commit": "d126061b624e0af6c3a556428712dd4d4194ec6d" },
|
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
|
||||||
"cmp-path": { "branch": "main", "commit": "e52e640b7befd8113b3350f46e8cfcfe98fcf730" },
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||||
"codecompanion.nvim": { "branch": "main", "commit": "99448f47c3e23a06009ac176ba4c785e162d9c10" },
|
"conform.nvim": { "branch": "master", "commit": "1a99fdc1d3aa9ccdf3021e67982a679a8c5c740c" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "973f3cb73887d510321653044791d7937c7ec0fa" },
|
"copilot.vim": { "branch": "release", "commit": "782461159655b259cff10ecff05efa761e3d4764" },
|
||||||
"copilot.vim": { "branch": "release", "commit": "12995dffe10282b29b8335650bf3e7457f4870e7" },
|
"dashboard-nvim": { "branch": "master", "commit": "fabf5feec96185817c732d47d363f34034212685" },
|
||||||
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
|
"dressing.nvim": { "branch": "master", "commit": "1b7921eecc65af1baf8ac1dc06f0794934cbcfb2" },
|
||||||
"flutter-tools.nvim": { "branch": "main", "commit": "70430c32d176f4a15c6e2c80586cd2791e3a664e" },
|
"flutter-tools.nvim": { "branch": "main", "commit": "ea1d398f543a54ba95357c3b8bb9d6f68eaec36c" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
"friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" },
|
||||||
"fzf": { "branch": "master", "commit": "ead302981cc9d9219e58c1517921e9f2d68a6b6e" },
|
"fzf": { "branch": "master", "commit": "855f90727af7827d9934b7fa00ea5ed51f5e4e81" },
|
||||||
"gen.nvim": { "branch": "main", "commit": "e09a8dbffa139ad60d5b47998fcc8669ead1ebf4" },
|
"git-blame.nvim": { "branch": "master", "commit": "8c56e864d448e84e0162872c381dd2715824dce2" },
|
||||||
"git-blame.nvim": { "branch": "master", "commit": "8503b199edf9a666fe7b1a989cf14e3c26b2eb03" },
|
"gitignore.nvim": { "branch": "master", "commit": "2455191ec94da8ed222806a4fe3aa358eac1e558" },
|
||||||
"gitignore.nvim": { "branch": "master", "commit": "0344f643768c4d64af4add8c1bdddf6f7d4c9010" },
|
"gitsigns.nvim": { "branch": "main", "commit": "1ef74b546732f185d0f806860fa5404df7614f28" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "0cb5a7753d3c4b8e9cfdc9d88d9110cb8d4b1544" },
|
"harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" },
|
||||||
"image.nvim": { "branch": "master", "commit": "4c51d6202628b3b51e368152c053c3fb5c5f76f2" },
|
"incline.nvim": { "branch": "main", "commit": "16fc9c073e3ea4175b66ad94375df6d73fc114c0" },
|
||||||
"incline.nvim": { "branch": "main", "commit": "0fd2d5a27504dba7fdc507a53275f22c081fe640" },
|
"indent-blankline.nvim": { "branch": "master", "commit": "18603eb949eba08300799f64027af11ef922283f" },
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
"keyseer.nvim": { "branch": "main", "commit": "6cb478f9b2be4af4680ceb0308a9b49cd6b6ea73" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
"lazy.nvim": { "branch": "main", "commit": "460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb" },
|
||||||
"llm.nvim": { "branch": "main", "commit": "9832a149bdcf0709433ca9c2c3a1c87460e98d13" },
|
"lspkind.nvim": { "branch": "master", "commit": "cff4ae321a91ee3473a92ea1a8c637e3a9510aec" },
|
||||||
"lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" },
|
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" },
|
||||||
"markview.nvim": { "branch": "main", "commit": "ec33f2aa333ca1d76f51847922578434d7aeadf7" },
|
"mason-nvim-dap.nvim": { "branch": "main", "commit": "8b9363d83b5d779813cdd2819b8308651cec2a09" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "bb3a17efc797c34c054463174e5522442576ebd8" },
|
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||||
"mason-registry": { "branch": "main", "commit": "467ac84d138997773be67e2e5bd4020cb96a3697" },
|
"mini.nvim": { "branch": "main", "commit": "19e1584124cda35388d4fdb911eab7124014e541" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
|
"nightfly": { "branch": "master", "commit": "19efaf31cbe15a429cb3ca6ac9c9fce13275045b" },
|
||||||
"mcphub.nvim": { "branch": "main", "commit": "0d53a53f327b61c45691d6a60a16c20baf4590ea" },
|
"noice.nvim": { "branch": "main", "commit": "c1ba80ccf6b3bd8c7fc88fe2e61085131d44ad65" },
|
||||||
"mini.diff": { "branch": "main", "commit": "63a7ce537ced356b8180892d9586826b0afb519c" },
|
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
|
||||||
"mini.nvim": { "branch": "main", "commit": "0420076298c4457f200c2de468f65d080597a347" },
|
"nvim-bqf": { "branch": "main", "commit": "1b24dc6050c34e8cd377b6b4cd6abe40509e0187" },
|
||||||
"nightfly": { "branch": "master", "commit": "8c55003e89f321a48a8cd4bb426dd3e7c58f0646" },
|
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
|
||||||
"nvim-bqf": { "branch": "main", "commit": "dd17c73912487dccb372deff85d4262d2b89bc2b" },
|
"nvim-dap": { "branch": "master", "commit": "90616ae6ae40053103dc66872886fc26b94c70c8" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
"nvim-dap-python": { "branch": "master", "commit": "db72bf6ab9f75fe841e8e11e772ee7fef6f484f1" },
|
||||||
"nvim-dap": { "branch": "master", "commit": "5dd4d50f2e6a2eaf9e57fad023d294ef371bda35" },
|
"nvim-dap-ui": { "branch": "master", "commit": "1c351e4e417d4691da12948b6ecf966936a56d28" },
|
||||||
"nvim-dap-python": { "branch": "master", "commit": "261ce649d05bc455a29f9636dc03f8cdaa7e0e2c" },
|
"nvim-dap-virtual-text": { "branch": "master", "commit": "3497eb39bf413a57ab5b7e7e2e192683e462148c" },
|
||||||
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
|
"nvim-highlight-colors": { "branch": "main", "commit": "a411550ef85cae467b889ba7d1a96bd78332d90e" },
|
||||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
|
"nvim-lsp-file-operations": { "branch": "master", "commit": "92a673de7ecaa157dd230d0128def10beb56d103" },
|
||||||
"nvim-highlight-colors": { "branch": "main", "commit": "b42a5ccec7457b44e89f7ed3b3afb1b375bb2093" },
|
"nvim-lspconfig": { "branch": "master", "commit": "aaec5d049af99e7b975bdf68aca582f1aa91b338" },
|
||||||
"nvim-lsp-file-operations": { "branch": "master", "commit": "9744b738183a5adca0f916527922078a965515ed" },
|
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "f47cd681d7cb6048876a2e908b6d8ba1e530d152" },
|
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
|
||||||
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
"nvim-silicon": { "branch": "main", "commit": "9fe6001dc8cad4d9c53bcfc8649e3dc76ffa169c" },
|
||||||
"nvim-notify": { "branch": "master", "commit": "a22f5d7ac511c2df2fd3290a9f04c48d5a822e2e" },
|
"nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
|
||||||
"nvim-silicon": { "branch": "main", "commit": "7f66bda8f60c97a5bf4b37e5b8acb0e829ae3c32" },
|
"nvim-treesitter": { "branch": "master", "commit": "2b2ac302324f4cd2194c5dcaa59332b65e1c6403" },
|
||||||
"nvim-surround": { "branch": "main", "commit": "ae298105122c87bbe0a36b1ad20b06d417c0433e" },
|
"nvim-treesitter-context": { "branch": "master", "commit": "7f7eeaa99e5a9beab518f502292871ae5f20de6f" },
|
||||||
"nvim-tmux-navigation": { "branch": "main", "commit": "4898c98702954439233fdaf764c39636681e2861" },
|
"nvim-web-devicons": { "branch": "master", "commit": "9154484705968658e9aab2b894d1b2a64bf9f83d" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
"nvim_lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||||
"nvim-treesitter-context": { "branch": "master", "commit": "59f318a65d42a5c4037796886a8874fd57f774fc" },
|
"pkl-neovim": { "branch": "main", "commit": "a0ae099c7eb926150ee0a126b1dd78086edbe3fc" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "0422a19d9aa3aad2c7e5cca167e5407b13407a9d" },
|
|
||||||
"nvim_lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
|
|
||||||
"pkl-neovim": { "branch": "main", "commit": "da9d189b4fad7e67e6b2a5456a3cbc4c9d32a17f" },
|
|
||||||
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
|
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
||||||
"poet-v": { "branch": "master", "commit": "85a5dd44d89602cc3dccd2489924e9c7caab0044" },
|
"poet-v": { "branch": "master", "commit": "85a5dd44d89602cc3dccd2489924e9c7caab0044" },
|
||||||
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
|
"rose-pine": { "branch": "main", "commit": "8b1fd252255a7f2c41b4192a787ab62660b29f72" },
|
||||||
"render-markdown.nvim": { "branch": "main", "commit": "7620d4e96eb5cf8d12e76c6fcaf1267628564ba9" },
|
"tailwind-sorter.nvim": { "branch": "main", "commit": "e03eea3909c28509375993fb77a42454ac8ecbb2" },
|
||||||
"rose-pine": { "branch": "main", "commit": "72befaffeac38db7bdd49e0549eaa2c4806dd878" },
|
"telescope-dap.nvim": { "branch": "master", "commit": "8c88d9716c91eaef1cdea13cb9390d8ef447dbfe" },
|
||||||
"smear-cursor.nvim": { "branch": "main", "commit": "4a0f7ac265b4ed1ce4d0af2afc13072763bfa691" },
|
"telescope-file-browser.nvim": { "branch": "master", "commit": "dd9de68c08b6d678198a99f5ea13e0384a1f04cf" },
|
||||||
"tailwind-sorter.nvim": { "branch": "main", "commit": "717e5c9761ed8334dadbb9357df7d826aae97b92" },
|
"telescope-themes": { "branch": "main", "commit": "f005622f066cc0cdbaf9bb44c48edbec67985501" },
|
||||||
"telescope-dap.nvim": { "branch": "master", "commit": "783366bd6c1e7fa0a5c59c07db37f49c805a28df" },
|
|
||||||
"telescope-file-browser.nvim": { "branch": "master", "commit": "7bf55ed0ff5be182ad3301cff266581fc1c56cce" },
|
|
||||||
"telescope-live-grep-args.nvim": { "branch": "master", "commit": "8ad632f793fd437865f99af5684f78300dac93fb" },
|
|
||||||
"telescope-media-files.nvim": { "branch": "master", "commit": "0826c7a730bc4d36068f7c85cf4c5b3fd9fb570a" },
|
|
||||||
"telescope-themes": { "branch": "main", "commit": "65721365bd7a04a6c9679e76b6387b60320fd5f3" },
|
|
||||||
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
|
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
|
||||||
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
|
"toggleterm.nvim": { "branch": "main", "commit": "48be57eaba817f038d61bbf64d2c597f578c0827" },
|
||||||
"tokyonight": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },
|
"tokyonight": { "branch": "main", "commit": "817bb6ffff1b9ce72cdd45d9fcfa8c9cd1ad3839" },
|
||||||
"tree-sitter-ghostty": { "branch": "main", "commit": "1d5238fc0da5fd5a59130b95c3e1c4948a3f96c1" },
|
"treesj": { "branch": "main", "commit": "0d81326b5afd36babe7dd480aabbb0b05f33e688" },
|
||||||
"treesj": { "branch": "main", "commit": "3b4a2bc42738a63de17e7485d4cc5e49970ddbcc" },
|
"trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" },
|
||||||
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
|
"undotree": { "branch": "master", "commit": "78b5241191852ffa9bb5da5ff2ee033160798c3b" },
|
||||||
"undotree": { "branch": "master", "commit": "28f2f54a34baff90ea6f4a735ef1813ad875c743" },
|
"vim-maximizer": { "branch": "master", "commit": "2e54952fe91e140a2e69f35f22131219fcd9c5f1" },
|
||||||
"venv-selector.nvim": { "branch": "regexp", "commit": "c677caa1030808a9f90092e522de7cc20c1390dd" },
|
"vim-tmux-navigator": { "branch": "master", "commit": "a9b52e7d36114d40350099f254b5f299a35df978" }
|
||||||
"vim-maximizer": { "branch": "master", "commit": "2e54952fe91e140a2e69f35f22131219fcd9c5f1" }
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,3 @@
|
|||||||
local cheatsheet = require("cheatsheet")
|
local cheatsheet = require("cheatsheet")
|
||||||
|
|
||||||
cheatsheet.setup({})
|
cheatsheet.setup({})
|
||||||
|
|
||||||
|
|
||||||
local opts = { noremap = true, silent = true }
|
|
||||||
|
|
||||||
opts.desc = "Show Cheatsheet"
|
|
||||||
vim.keymap.set("n", "<leader>\\", "<cmd>Cheatsheet<CR>", opts) -- toggle file explorer
|
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
local codecompanion = require("codecompanion")
|
|
||||||
|
|
||||||
codecompanion.setup({
|
|
||||||
strategies = {
|
|
||||||
chat = {
|
|
||||||
adapter = "openai",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
extensions = {
|
|
||||||
mcphub = {
|
|
||||||
callback = "mcphub.extensions.codecompanion",
|
|
||||||
opts = {
|
|
||||||
make_vars = true,
|
|
||||||
make_slash_commands = true,
|
|
||||||
show_result_in_chat = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
local opts = {
|
|
||||||
noremap = true,
|
|
||||||
silent = true,
|
|
||||||
}
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>ac", function()
|
|
||||||
vim.cmd("CodeCompanionChat")
|
|
||||||
end, opts)
|
|
||||||
|
|
||||||
vim.keymap.set({ "n", "v" }, "<leader>ai", function()
|
|
||||||
local input = vim.fn.input("[Code Companion Inline]: ")
|
|
||||||
local trimmed_input = vim.fn.trim(input)
|
|
||||||
|
|
||||||
if trimmed_input == "" then
|
|
||||||
vim.notify("No input provided for inline code companion", vim.log.levels.WARN)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.cmd("CodeCompanion" .. " " .. vim.fn.shellescape(trimmed_input))
|
|
||||||
end, opts)
|
|
||||||
@@ -1,33 +1,14 @@
|
|||||||
local conform = require("conform")
|
local conform = require("conform")
|
||||||
|
|
||||||
conform.setup({
|
conform.setup({
|
||||||
format_on_save = function(bufnr)
|
|
||||||
local disable_filetypes = {}
|
|
||||||
return {
|
|
||||||
timeout_ms = 500,
|
|
||||||
lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype],
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
sh = { "shfmt" },
|
|
||||||
lua = { "stylua" },
|
lua = { "stylua" },
|
||||||
-- Conform will run multiple formatters sequentially
|
-- Conform will run multiple formatters sequentially
|
||||||
python = {
|
python = { "isort", "black" },
|
||||||
|
|
||||||
-- To fix auto-fixable lint errors.
|
|
||||||
"ruff_fix",
|
|
||||||
-- To run the Ruff formatter.
|
|
||||||
"ruff_format",
|
|
||||||
-- To organize the imports.
|
|
||||||
"ruff_organize_imports",
|
|
||||||
},
|
|
||||||
-- Use a sub-list to run only the first available formatter
|
-- Use a sub-list to run only the first available formatter
|
||||||
javascript = { "biome" },
|
javascript = { "biome" },
|
||||||
astro = { "prettierd", "prettier", "biome" },
|
astro = { { "prettierd", "prettier" } },
|
||||||
vue = { "prettierd", "prettier" },
|
|
||||||
proto = { "buf" },
|
|
||||||
yaml = { "prettierd", "prettier" },
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
|
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
local dap = require("dap")
|
local dap = require("dap")
|
||||||
local dapui = require("dapui")
|
local dapui = require("dapui")
|
||||||
|
local dap_python = require("dap-python")
|
||||||
local virtual_text = require("nvim-dap-virtual-text")
|
local virtual_text = require("nvim-dap-virtual-text")
|
||||||
|
|
||||||
-- Setup Virtual Text
|
-- Setup Virtual Text
|
||||||
@@ -10,7 +11,12 @@ virtual_text.setup({
|
|||||||
enabled = true,
|
enabled = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
local mason_path = vim.fn.glob(vim.fn.stdpath("data") .. "/mason")
|
||||||
|
local debugpy_path = mason_path .. "/packages/debugpy/venv/bin/python"
|
||||||
|
|
||||||
dapui.setup()
|
dapui.setup()
|
||||||
|
dap_python.setup(debugpy_path)
|
||||||
|
|
||||||
dap.listeners.after.event_initialized["dapui_config"] = function()
|
dap.listeners.after.event_initialized["dapui_config"] = function()
|
||||||
dapui.open()
|
dapui.open()
|
||||||
@@ -29,3 +35,8 @@ local opts = { noremap = true, silent = true }
|
|||||||
|
|
||||||
opts.desc = "Toggle breakpoint"
|
opts.desc = "Toggle breakpoint"
|
||||||
vim.keymap.set("n", "<leader>db", "<cmd> DapToggleBreakpoint<CR>", opts)
|
vim.keymap.set("n", "<leader>db", "<cmd> DapToggleBreakpoint<CR>", opts)
|
||||||
|
|
||||||
|
opts.desc = "Debug Python Run"
|
||||||
|
vim.keymap.set("n", "<leader>dpr", function()
|
||||||
|
dap_python.test_method()
|
||||||
|
end, opts)
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
local dashboard = require("dashboard")
|
||||||
|
|
||||||
|
local header = {
|
||||||
|
[[' ⣇⣿⠘⣿⣿⣿⡿⡿⣟⣟⢟⢟⢝⠵⡝⣿⡿⢂⣼⣿⣷⣌⠩⡫⡻⣝⠹⢿⣿⣷ ']],
|
||||||
|
[[' ⡆⣿⣆⠱⣝⡵⣝⢅⠙⣿⢕⢕⢕⢕⢝⣥⢒⠅⣿⣿⣿⡿⣳⣌⠪⡪⣡⢑⢝⣇ ']],
|
||||||
|
[[' ⡆⣿⣿⣦⠹⣳⣳⣕⢅⠈⢗⢕⢕⢕⢕⢕⢈⢆⠟⠋⠉⠁⠉⠉⠁⠈⠼⢐⢕⢽ ']],
|
||||||
|
[[' ⡗⢰⣶⣶⣦⣝⢝⢕⢕⠅⡆⢕⢕⢕⢕⢕⣴⠏⣠⡶⠛⡉⡉⡛⢶⣦⡀⠐⣕⢕ ']],
|
||||||
|
[[' ⡝⡄⢻⢟⣿⣿⣷⣕⣕⣅⣿⣔⣕⣵⣵⣿⣿⢠⣿⢠⣮⡈⣌⠨⠅⠹⣷⡀⢱⢕ ']],
|
||||||
|
[[' ⡝⡵⠟⠈⢀⣀⣀⡀⠉⢿⣿⣿⣿⣿⣿⣿⣿⣼⣿⢈⡋⠴⢿⡟⣡⡇⣿⡇⡀⢕ ']],
|
||||||
|
[[' ⡝⠁⣠⣾⠟⡉⡉⡉⠻⣦⣻⣿⣿⣿⣿⣿⣿⣿⣿⣧⠸⣿⣦⣥⣿⡇⡿⣰⢗⢄ ']],
|
||||||
|
[[' ⠁⢰⣿⡏⣴⣌⠈⣌⠡⠈⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣬⣉⣉⣁⣄⢖⢕⢕⢕ ']],
|
||||||
|
[[' ⡀⢻⣿⡇⢙⠁⠴⢿⡟⣡⡆⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣵⣵⣿ ']],
|
||||||
|
[[' ⡻⣄⣻⣿⣌⠘⢿⣷⣥⣿⠇⣿⣿⣿⣿⣿⣿⠛⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ']],
|
||||||
|
[[' ⣷⢄⠻⣿⣟⠿⠦⠍⠉⣡⣾⣿⣿⣿⣿⣿⣿⢸⣿⣦⠙⣿⣿⣿⣿⣿⣿⣿⣿⠟ ']],
|
||||||
|
[[' ⡕⡑⣑⣈⣻⢗⢟⢞⢝⣻⣿⣿⣿⣿⣿⣿⣿⠸⣿⠿⠃⣿⣿⣿⣿⣿⣿⡿⠁⣠ ']],
|
||||||
|
[[' ⡝⡵⡈⢟⢕⢕⢕⢕⣵⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣶⣿⣿⣿⣿⣿⠿⠋⣀⣈⠙ ']],
|
||||||
|
[[' ⡝⡵⡕⡀⠑⠳⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⡠⡲⡫⡪⡪⡣ ']],
|
||||||
|
}
|
||||||
|
|
||||||
|
dashboard.setup({
|
||||||
|
theme = "hyper",
|
||||||
|
config = {
|
||||||
|
header = header,
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
local gen = require("gen")
|
|
||||||
|
|
||||||
gen.setup({
|
|
||||||
-- Custom Parameters (with defaults)
|
|
||||||
model = "deepseek-r1:7b", -- The default model to use.
|
|
||||||
quit_map = "q", -- set keymap to close the response window
|
|
||||||
retry_map = "<c-r>", -- set keymap to re-send the current prompt
|
|
||||||
accept_map = "<c-cr>", -- set keymap to replace the previous selection with the last result
|
|
||||||
host = "localhost", -- The host running the Ollama service.
|
|
||||||
port = "11434", -- The port on which the Ollama service is listening.
|
|
||||||
display_mode = "split", -- The display mode. Can be "float" or "split" or "horizontal-split".
|
|
||||||
show_prompt = false, -- Shows the prompt submitted to Ollama. Can be true (3 lines) or "full".
|
|
||||||
show_model = false, -- Displays which model you are using at the beginning of your chat session.
|
|
||||||
no_auto_close = false, -- Never closes the window automatically.
|
|
||||||
file = false, -- Write the payload to a temporary file to keep the command short.
|
|
||||||
hidden = false, -- Hide the generation window (if true, will implicitly set `prompt.replace = true`), requires Neovim >= 0.10
|
|
||||||
init = function(options)
|
|
||||||
pcall(io.popen, "ollama serve > /dev/null 2>&1 &")
|
|
||||||
end,
|
|
||||||
-- Function to initialize Ollama
|
|
||||||
command = function(options)
|
|
||||||
local body = { model = options.model, stream = true }
|
|
||||||
return "curl --silent --no-buffer -X POST http://"
|
|
||||||
.. options.host
|
|
||||||
.. ":"
|
|
||||||
.. options.port
|
|
||||||
.. "/api/chat -d $body"
|
|
||||||
end,
|
|
||||||
-- The command for the Ollama service. You can use placeholders $prompt, $model and $body (shellescaped).
|
|
||||||
-- This can also be a command string.
|
|
||||||
-- The executed command must return a JSON object with { response, context }
|
|
||||||
-- (context property is optional).
|
|
||||||
-- list_models = '<omitted lua function>', -- Retrieves a list of model names
|
|
||||||
result_filetype = "markdown", -- Configure filetype of the result buffer
|
|
||||||
debug = false, -- Prints errors and the command which is run.
|
|
||||||
})
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
local mark = require("harpoon.mark")
|
||||||
|
local ui = require("harpoon.ui")
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>a", mark.add_file)
|
||||||
|
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<C-1>", function() ui.nav_file(1) end)
|
||||||
|
vim.keymap.set("n", "<C-2>", function() ui.nav_file(2) end)
|
||||||
|
vim.keymap.set("n", "<C-3>", function() ui.nav_file(3) end)
|
||||||
|
vim.keymap.set("n", "<C-4>", function() ui.nav_file(4) end)
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
require("image").setup({
|
|
||||||
backend = "kitty",
|
|
||||||
processor = "magick_rock", -- or "magick_cli"
|
|
||||||
integrations = {
|
|
||||||
markdown = {
|
|
||||||
enabled = true,
|
|
||||||
clear_in_insert_mode = false,
|
|
||||||
download_remote_images = true,
|
|
||||||
only_render_image_at_cursor = false,
|
|
||||||
floating_windows = true, -- if true, images will be rendered in floating markdown windows
|
|
||||||
filetypes = { "markdown", "vimwiki" }, -- markdown extensions (ie. quarto) can go here
|
|
||||||
},
|
|
||||||
neorg = {
|
|
||||||
enabled = true,
|
|
||||||
filetypes = { "norg" },
|
|
||||||
},
|
|
||||||
typst = {
|
|
||||||
enabled = true,
|
|
||||||
filetypes = { "typst" },
|
|
||||||
},
|
|
||||||
html = {
|
|
||||||
enabled = false,
|
|
||||||
},
|
|
||||||
css = {
|
|
||||||
enabled = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
max_width = nil,
|
|
||||||
max_height = nil,
|
|
||||||
max_width_window_percentage = nil,
|
|
||||||
max_height_window_percentage = 50,
|
|
||||||
window_overlap_clear_enabled = true, -- toggles images when windows are overlapped
|
|
||||||
window_overlap_clear_ft_ignore = { "cmp_menu", "cmp_docs", "snacks_notif", "scrollview", "scrollview_sign" },
|
|
||||||
editor_only_render_when_focused = true, -- auto show/hide images when the editor gains/looses focus
|
|
||||||
tmux_show_only_in_active_window = true, -- auto show/hide images in the correct Tmux window (needs visual-activity off)
|
|
||||||
hijack_file_patterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", "*.webp", "*.avif", "*.svg" }, -- render image files as images when opened
|
|
||||||
})
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
local keyseer = require("keyseer")
|
||||||
|
|
||||||
|
keyseer.setup({})
|
||||||
@@ -1,105 +0,0 @@
|
|||||||
local llm = require("llm")
|
|
||||||
local llmCompletion = require("llm.completion")
|
|
||||||
|
|
||||||
llm.setup({
|
|
||||||
api_token = nil, -- cf Install paragraph
|
|
||||||
model = "codellama:13b", -- the model ID, behavior depends on backend
|
|
||||||
backend = "ollama", -- backend ID, "huggingface" | "ollama" | "openai" | "tgi"
|
|
||||||
url = "http://localhost:11434", -- the http url of the backend
|
|
||||||
-- tokens_to_clear = { "<|endoftext|>" }, -- tokens to remove from the model's output
|
|
||||||
tokens_to_clear = { "<EOT>" },
|
|
||||||
-- parameters that are added to the request body, values are arbitrary, you can set any field:value pair here it will be passed as is to the backend
|
|
||||||
request_body = {
|
|
||||||
parameters = {
|
|
||||||
-- max_new_tokens = 60,
|
|
||||||
temperature = 0.2,
|
|
||||||
top_p = 0.95,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- set this if the model supports fill in the middle
|
|
||||||
-- fim = {
|
|
||||||
-- enabled = false,
|
|
||||||
-- prefix = "<fim_prefix>",
|
|
||||||
-- middle = "<fim_middle>",
|
|
||||||
-- suffix = "<fim_suffix>",
|
|
||||||
-- },
|
|
||||||
fim = {
|
|
||||||
enabled = true,
|
|
||||||
prefix = "<PRE> ",
|
|
||||||
middle = " <MID>",
|
|
||||||
suffix = " <SUF>",
|
|
||||||
},
|
|
||||||
|
|
||||||
debounce_ms = 150,
|
|
||||||
accept_keymap = nil,
|
|
||||||
dismiss_keymap = nil,
|
|
||||||
tls_skip_verify_insecure = false,
|
|
||||||
-- llm-ls configuration, cf llm-ls section
|
|
||||||
|
|
||||||
lsp = {
|
|
||||||
bin_path = vim.api.nvim_call_function("stdpath", { "data" }) .. "/mason/bin/llm-ls",
|
|
||||||
cmd_env = { LLM_LOG_LEVEL = "DEBUG" },
|
|
||||||
},
|
|
||||||
-- tokenizer = nil, -- cf Tokenizer paragraph
|
|
||||||
tokenizer = {
|
|
||||||
repository = "codellama/CodeLlama-13b-hf",
|
|
||||||
},
|
|
||||||
context_window = 4096,
|
|
||||||
enable_suggestions_on_startup = false,
|
|
||||||
enable_suggestions_on_files = { "*.py", "*.js", "*.ts", "*.astro", "*.vue", "*.lua" },
|
|
||||||
disable_url_path_completion = false, -- cf Backend
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.keymap.set("i", "<Tab>", function()
|
|
||||||
if llmCompletion.shown_suggestion ~= nil then
|
|
||||||
llmCompletion.complete()
|
|
||||||
else
|
|
||||||
local keys = vim.api.nvim_replace_termcodes("<Tab>", true, false, true)
|
|
||||||
vim.api.nvim_feedkeys(keys, "n", false)
|
|
||||||
end
|
|
||||||
end, { noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<Tab>", function()
|
|
||||||
if llmCompletion.shown_suggestion ~= nil then
|
|
||||||
llmCompletion.complete()
|
|
||||||
else
|
|
||||||
local keys = vim.api.nvim_replace_termcodes("<Tab>", true, false, true)
|
|
||||||
vim.api.nvim_feedkeys(keys, "n", false)
|
|
||||||
end
|
|
||||||
end, { noremap = true, silent = true })
|
|
||||||
|
|
||||||
-- Debounce helper
|
|
||||||
local debounce = function(func, timeout)
|
|
||||||
if type(func) ~= "function" then
|
|
||||||
error("Expected a function")
|
|
||||||
end
|
|
||||||
if type(timeout) ~= "number" or timeout <= 0 then
|
|
||||||
error("Expected a positive number for timeout")
|
|
||||||
end
|
|
||||||
local timer = vim.uv.new_timer()
|
|
||||||
return function(...)
|
|
||||||
local args = { ... }
|
|
||||||
timer:stop() -- Reset the timer
|
|
||||||
timer:start(
|
|
||||||
timeout,
|
|
||||||
0,
|
|
||||||
vim.schedule_wrap(function()
|
|
||||||
func(unpack(args))
|
|
||||||
end)
|
|
||||||
)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
-- Define the function to be executed
|
|
||||||
local function on_text_change()
|
|
||||||
llmCompletion.lsp_suggest()
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Debounce the function
|
|
||||||
local debounced_on_text_change = debounce(on_text_change, 3000)
|
|
||||||
|
|
||||||
-- Set up the autocommand
|
|
||||||
vim.api.nvim_create_autocmd({ "InsertCharPre" }, {
|
|
||||||
pattern = "*",
|
|
||||||
callback = debounced_on_text_change,
|
|
||||||
desc = "Run method after typing stops with debounce",
|
|
||||||
})
|
|
||||||
@@ -1,13 +1,10 @@
|
|||||||
-- Setup language servers.
|
-- Setup language servers.
|
||||||
local conform = require("conform")
|
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
local cmp_nvim_lsp = require("cmp_nvim_lsp")
|
local cmp_nvim_lsp = require("cmp_nvim_lsp")
|
||||||
|
|
||||||
|
local DPE = require("absolute.utils.detect-python-env")
|
||||||
|
|
||||||
local opts = { noremap = true, silent = true }
|
local opts = { noremap = true, silent = true }
|
||||||
|
|
||||||
local global_node_modules = vim.fn.system("npm root -g")
|
|
||||||
|
|
||||||
-- client, buffer
|
|
||||||
local on_attach = function(client, bufnr)
|
local on_attach = function(client, bufnr)
|
||||||
opts.buffer = bufnr
|
opts.buffer = bufnr
|
||||||
|
|
||||||
@@ -48,24 +45,12 @@ local on_attach = function(client, bufnr)
|
|||||||
vim.keymap.set("n", "<leader>cr", "<cmd>Telescope lsp_references<CR>", opts)
|
vim.keymap.set("n", "<leader>cr", "<cmd>Telescope lsp_references<CR>", opts)
|
||||||
|
|
||||||
opts.desc = "Format File"
|
opts.desc = "Format File"
|
||||||
vim.keymap.set({ "n", "v" }, "<leader>f", function()
|
vim.keymap.set("n", "<leader>f", function()
|
||||||
-- vim.lsp.buf.format({ async = true })
|
vim.lsp.buf.format({ async = true })
|
||||||
conform.format({
|
|
||||||
bufnr = opts.buffer,
|
|
||||||
async = true,
|
|
||||||
lsp_fallback = true,
|
|
||||||
})
|
|
||||||
end, opts)
|
end, opts)
|
||||||
|
|
||||||
opts.desc = "Restart LSP"
|
opts.desc = "Restart LSP"
|
||||||
vim.keymap.set("n", "<leader>rs", "<cmd>LspRestart<CR>", opts)
|
vim.keymap.set("n", "<leader>rs", "<cmd>LspRestart<CR>", opts)
|
||||||
|
|
||||||
-- LSP Only Settings
|
|
||||||
-- Ruff & Pyright behaviour
|
|
||||||
if client.name == "ruff" then
|
|
||||||
-- Disable hover in favor of Pyright
|
|
||||||
client.server_capabilities.hoverProvider = false
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local capabilities = cmp_nvim_lsp.default_capabilities()
|
local capabilities = cmp_nvim_lsp.default_capabilities()
|
||||||
@@ -93,16 +78,6 @@ lspconfig["html"].setup({
|
|||||||
lspconfig["ts_ls"].setup({
|
lspconfig["ts_ls"].setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
init_options = {
|
|
||||||
plugins = {
|
|
||||||
{
|
|
||||||
name = "@vue/typescript-plugin",
|
|
||||||
location = global_node_modules .. "@vue/typescript-plugin",
|
|
||||||
languages = { "vue" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
filetypes = { "typescript", "javascript", "javascriptreact", "typescriptreact", "vue" },
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- configure css server
|
-- configure css server
|
||||||
@@ -115,7 +90,6 @@ lspconfig["cssls"].setup({
|
|||||||
lspconfig["tailwindcss"].setup({
|
lspconfig["tailwindcss"].setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
filetypes = { "html", "svelte", "vue", "astro" },
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- configure svelte server
|
-- configure svelte server
|
||||||
@@ -143,7 +117,6 @@ lspconfig["emmet_ls"].setup({
|
|||||||
"html",
|
"html",
|
||||||
"typescriptreact",
|
"typescriptreact",
|
||||||
"javascriptreact",
|
"javascriptreact",
|
||||||
"astro",
|
|
||||||
"css",
|
"css",
|
||||||
"sass",
|
"sass",
|
||||||
"scss",
|
"scss",
|
||||||
@@ -153,28 +126,41 @@ lspconfig["emmet_ls"].setup({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- configure ruff server
|
|
||||||
lspconfig["ruff"].setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = on_attach,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- configure pyright server
|
-- configure python lsp
|
||||||
lspconfig["pyright"].setup({
|
lspconfig["pylsp"].setup({
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = on_attach,
|
|
||||||
filetypes = { "python" },
|
filetypes = { "python" },
|
||||||
settings = {
|
capabilities = capabilities,
|
||||||
python = {
|
on_attach = on_attach,
|
||||||
analysis = {
|
pylsp = {
|
||||||
autoSearchPaths = true,
|
pylsp = {
|
||||||
useLibraryCodeForTypes = true,
|
plugins = {
|
||||||
diagnosticMode = "workspace",
|
rope_autoimport = {
|
||||||
|
enabled = true,
|
||||||
|
completions = { enabled = true },
|
||||||
|
rename = { enabled = false },
|
||||||
|
},
|
||||||
|
black = { enabled = true },
|
||||||
|
autopep8 = { enabled = false },
|
||||||
|
yapf = { enabled = false },
|
||||||
|
flake8 = { enabled = true },
|
||||||
|
jedi_completion = {
|
||||||
|
enabled = true,
|
||||||
|
include_params = true,
|
||||||
|
fuzzy = true,
|
||||||
|
},
|
||||||
|
pylsp_mypy = {
|
||||||
|
enabled = true,
|
||||||
|
overrides = DPE.ResolvePythonEnvironment(),
|
||||||
|
report_progress = true,
|
||||||
|
live_mode = true,
|
||||||
|
},
|
||||||
|
-- import sorting
|
||||||
|
pyls_isort = { enabled = true },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- configure docker server
|
-- configure docker server
|
||||||
lspconfig["dockerls"].setup({
|
lspconfig["dockerls"].setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
@@ -192,33 +178,6 @@ lspconfig["volar"].setup({
|
|||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
filetypes = { "vue" },
|
filetypes = { "vue" },
|
||||||
init_options = {
|
|
||||||
vue = {
|
|
||||||
hybridMode = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
settings = {
|
|
||||||
typescript = {
|
|
||||||
inlayHints = {
|
|
||||||
enumMemberValues = {
|
|
||||||
enabled = true,
|
|
||||||
},
|
|
||||||
functionLikeReturnTypes = {
|
|
||||||
enabled = true,
|
|
||||||
},
|
|
||||||
propertyDeclarationTypes = {
|
|
||||||
enabled = true,
|
|
||||||
},
|
|
||||||
parameterTypes = {
|
|
||||||
enabled = true,
|
|
||||||
suppressWhenArgumentMatchesName = true,
|
|
||||||
},
|
|
||||||
variableTypes = {
|
|
||||||
enabled = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- configure rust server
|
-- configure rust server
|
||||||
@@ -258,6 +217,12 @@ lspconfig["cssls"].setup({
|
|||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- configure htmx server
|
||||||
|
lspconfig["htmx"].setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
on_attach = on_attach,
|
||||||
|
})
|
||||||
|
|
||||||
--configure docker file server
|
--configure docker file server
|
||||||
lspconfig["dockerls"].setup({
|
lspconfig["dockerls"].setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
@@ -280,11 +245,6 @@ lspconfig["eslint"].setup({
|
|||||||
lspconfig["astro"].setup({
|
lspconfig["astro"].setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
-- init_options = {
|
|
||||||
-- typescript = {
|
|
||||||
-- tsdk = ResolveTypescriptServer(),
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- configure kotlin server
|
-- configure kotlin server
|
||||||
@@ -293,21 +253,12 @@ lspconfig["kotlin_language_server"].setup({
|
|||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
-- configure clang server
|
-- configure clang server
|
||||||
|
|
||||||
lspconfig["clangd"].setup({
|
lspconfig["clangd"].setup({
|
||||||
cmd = { "clangd", "--compile-commands-dir=./", "--background-index=false" },
|
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
filetypes = { "c", "cpp", "objc", "objcpp" },
|
|
||||||
})
|
|
||||||
|
|
||||||
-- configure bufls server
|
|
||||||
|
|
||||||
lspconfig["buf_ls"].setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = on_attach,
|
|
||||||
filetypes = { "proto" },
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- configure arduino language server
|
-- configure arduino language server
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
local lualine = require("lualine")
|
local lualine = require("lualine")
|
||||||
local lazy_status = require("lazy.status") -- to configure lazy pending updates count
|
local lazy_status = require("lazy.status") -- to configure lazy pending updates count
|
||||||
|
local noice = require("noice")
|
||||||
|
|
||||||
local colors = {
|
local colors = {
|
||||||
blue = "#65D1FF",
|
blue = "#65D1FF",
|
||||||
@@ -45,6 +46,21 @@ local my_lualine_theme = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function GetFlutterToolsStatusLine()
|
||||||
|
local application_version = vim.g.flutter_tools_decorations.app_version
|
||||||
|
local device = vim.g.flutter_tools_decorations.device
|
||||||
|
|
||||||
|
local result = "Flutter: " .. application_version .. " " .. device
|
||||||
|
end
|
||||||
|
|
||||||
|
function IsFlutterToolsActive()
|
||||||
|
if vim.g.flutter_tools_decorations ~= nil then
|
||||||
|
return true
|
||||||
|
else
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function GetPoetvStatusLine()
|
function GetPoetvStatusLine()
|
||||||
-- Get the poetv statusline
|
-- Get the poetv statusline
|
||||||
-- If poetv is not active, return empty string
|
-- If poetv is not active, return empty string
|
||||||
@@ -79,6 +95,16 @@ lualine.setup({
|
|||||||
},
|
},
|
||||||
sections = {
|
sections = {
|
||||||
lualine_x = {
|
lualine_x = {
|
||||||
|
{
|
||||||
|
noice.api.statusline.mode.get,
|
||||||
|
cond = noice.api.statusline.mode.has,
|
||||||
|
color = { fg = "#ff9e64" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
GetFlutterToolsStatusLine,
|
||||||
|
cond = IsFlutterToolsActive,
|
||||||
|
color = { fg = "#ff9e64" },
|
||||||
|
},
|
||||||
{
|
{
|
||||||
GetPoetvStatusLine,
|
GetPoetvStatusLine,
|
||||||
cond = IsPoetvActive,
|
cond = IsPoetvActive,
|
||||||
|
|||||||
@@ -8,13 +8,19 @@ require("mason-lspconfig").setup({
|
|||||||
"html",
|
"html",
|
||||||
"emmet_ls",
|
"emmet_ls",
|
||||||
"lua_ls",
|
"lua_ls",
|
||||||
"arduino_language_server",
|
'arduino_language_server',
|
||||||
"clangd",
|
'clangd',
|
||||||
"tailwindcss",
|
"tailwindcss",
|
||||||
"svelte",
|
"svelte",
|
||||||
"cssls",
|
"cssls",
|
||||||
"jedi_language_server",
|
"jedi_language_server",
|
||||||
"kotlin_language_server",
|
"kotlin_language_server"
|
||||||
},
|
},
|
||||||
automatic_enable = false,
|
automatic_installation = true,
|
||||||
|
})
|
||||||
|
require("mason-nvim-dap").setup({
|
||||||
|
ensure_installed = {
|
||||||
|
"debugpy", -- python
|
||||||
|
},
|
||||||
|
automatic_installation = true,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
local diff = require("mini.diff")
|
|
||||||
|
|
||||||
diff.setup({
|
|
||||||
-- Disabled by default
|
|
||||||
source = diff.gen_source.none(),
|
|
||||||
})
|
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
local noice = require("noice")
|
||||||
|
local notify = require("notify")
|
||||||
|
|
||||||
|
|
||||||
|
notify.setup({
|
||||||
|
top_down = false,
|
||||||
|
animate = false,
|
||||||
|
stages = "static",
|
||||||
|
})
|
||||||
|
|
||||||
|
noice.setup({
|
||||||
|
routes = {
|
||||||
|
{
|
||||||
|
filter = {
|
||||||
|
event = "msg_show",
|
||||||
|
min_height = 20,
|
||||||
|
},
|
||||||
|
view = "cmdline_output",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
filter = {
|
||||||
|
event = "lsp",
|
||||||
|
kind = "progress",
|
||||||
|
cond = function(message)
|
||||||
|
local client = vim.tbl_get(message.opts, "progress", "client")
|
||||||
|
|
||||||
|
return client == "lua_ls"
|
||||||
|
end
|
||||||
|
},
|
||||||
|
opts = { skip = true },
|
||||||
|
}
|
||||||
|
},
|
||||||
|
lsp = {
|
||||||
|
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
||||||
|
override = {
|
||||||
|
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||||
|
["vim.lsp.util.stylize_markdown"] = true,
|
||||||
|
["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp
|
||||||
|
},
|
||||||
|
},
|
||||||
|
cmdline = {
|
||||||
|
format = {
|
||||||
|
search_down = {
|
||||||
|
view = "cmdline",
|
||||||
|
},
|
||||||
|
search_up = {
|
||||||
|
view = "cmdline",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
views = {
|
||||||
|
cmdline_popup = {
|
||||||
|
relative = "editor",
|
||||||
|
position = {
|
||||||
|
row = 5,
|
||||||
|
col = "50%",
|
||||||
|
},
|
||||||
|
size = {
|
||||||
|
width = 60,
|
||||||
|
height = "auto",
|
||||||
|
},
|
||||||
|
border = {
|
||||||
|
style = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
|
||||||
|
padding = { 0, 1 },
|
||||||
|
},
|
||||||
|
filter_options = {},
|
||||||
|
win_options = {
|
||||||
|
winhighlight = {
|
||||||
|
Normal = "Normal",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
popupmenu = {
|
||||||
|
relative = "editor",
|
||||||
|
position = {
|
||||||
|
row = 8,
|
||||||
|
col = "50%",
|
||||||
|
},
|
||||||
|
size = {
|
||||||
|
width = 60,
|
||||||
|
height = 10,
|
||||||
|
},
|
||||||
|
border = {
|
||||||
|
style = "rounded",
|
||||||
|
padding = { 0, 1 },
|
||||||
|
},
|
||||||
|
win_options = {
|
||||||
|
winhighlight = { Normal = "Normal", FloatBorder = "DiagnosticInfo" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
local null_ls = require("null-ls")
|
||||||
|
|
||||||
|
null_ls.setup({
|
||||||
|
sources = {
|
||||||
|
null_ls.builtins.formatting.stylua,
|
||||||
|
null_ls.builtins.formatting.prettierd,
|
||||||
|
null_ls.builtins.formatting.shfmt,
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
local notify = require("notify")
|
|
||||||
|
|
||||||
notify.setup({
|
|
||||||
background_colour = "#000000",
|
|
||||||
fps = 15,
|
|
||||||
icons = {
|
|
||||||
DEBUG = "",
|
|
||||||
ERROR = "",
|
|
||||||
INFO = "",
|
|
||||||
TRACE = "✎",
|
|
||||||
WARN = "",
|
|
||||||
},
|
|
||||||
level = 2,
|
|
||||||
minimum_width = 50,
|
|
||||||
render = "default",
|
|
||||||
stages = "static",
|
|
||||||
time_formats = {
|
|
||||||
notification = "%T",
|
|
||||||
notification_history = "%FT%T",
|
|
||||||
},
|
|
||||||
timeout = 3000,
|
|
||||||
top_down = true,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.notify = notify
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
local cmp = require("cmp")
|
local cmp = require("cmp")
|
||||||
local types = require("cmp.types")
|
local types = require('cmp.types')
|
||||||
local luasnip = require("luasnip")
|
local luasnip = require("luasnip")
|
||||||
local lspkind = require("lspkind")
|
local lspkind = require("lspkind")
|
||||||
|
|
||||||
@@ -8,18 +8,18 @@ require("luasnip.loaders.from_vscode").lazy_load()
|
|||||||
|
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
completion = {
|
completion = {
|
||||||
completeopt = "menu,menuone,preview,noinsert,noselect",
|
completeopt = "menu,menuone,preview,noinsert",
|
||||||
autocomplete = { types.cmp.TriggerEvent.TextChanged },
|
autocomplete = { types.cmp.TriggerEvent.TextChanged },
|
||||||
},
|
},
|
||||||
window = {
|
window = {
|
||||||
documentation = {
|
documentation = {
|
||||||
border = { "┌", "─", "┐", "│", "┘", "─", "└", "│" },
|
border = { '┌', '─', '┐', '│', '┘', '─', '└', '│' },
|
||||||
winhighlight = "Normal:CmpPmenu,FloatBorder:CmpPmenuBorder,CursorLine:PmenuSel,Search:None",
|
winhighlight = 'Normal:CmpPmenu,FloatBorder:CmpPmenuBorder,CursorLine:PmenuSel,Search:None',
|
||||||
},
|
},
|
||||||
completion = {
|
completion = {
|
||||||
side_padding = 1,
|
side_padding = 1,
|
||||||
border = { "┌", "─", "┐", "│", "┘", "─", "└", "│" },
|
border = { '┌', '─', '┐', '│', '┘', '─', '└', '│' },
|
||||||
winhighlight = "Normal:CmpPmenu,FloatBorder:CmpPmenuBorder,CursorLine:PmenuSel,Search:None",
|
winhighlight = 'Normal:CmpPmenu,FloatBorder:CmpPmenuBorder,CursorLine:PmenuSel,Search:None',
|
||||||
scrollbar = false,
|
scrollbar = false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -29,19 +29,17 @@ cmp.setup({
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
mapping = cmp.mapping.preset.insert({
|
mapping = cmp.mapping.preset.insert({
|
||||||
["<C-.>"] = cmp.mapping.complete(), -- show completion suggestions
|
["<C-o>"] = cmp.mapping.complete(), -- show completion suggestions
|
||||||
["C-<BS>"] = cmp.mapping.abort(), -- close completion menu
|
["<C-e>"] = cmp.mapping.abort(), -- close completion menu
|
||||||
["<CR>"] = cmp.mapping.confirm({ select = true }), -- accept current selection
|
["<CR>"] = cmp.mapping.confirm({ select = true }), -- accept current selection
|
||||||
}),
|
}),
|
||||||
|
|
||||||
-- sources for autocompletion
|
-- sources for autocompletion
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = "nvim_lsp" },
|
{ name = "nvim_lsp" },
|
||||||
{ name = "codecompanion" }, -- code companion for AI-assisted coding
|
|
||||||
{ name = "luasnip" }, -- snippets
|
{ name = "luasnip" }, -- snippets
|
||||||
{ name = "buffer" }, -- text within current buffer
|
{ name = "buffer" }, -- text within current buffer
|
||||||
{ name = "path" }, -- file system paths,
|
{ name = "path" }, -- file system paths,
|
||||||
{ name = "nvim_lsp_signature_help" },
|
{ name = 'nvim_lsp_signature_help' },
|
||||||
}),
|
}),
|
||||||
-- configure lspkind for vs-code like pictograms in completion menu
|
-- configure lspkind for vs-code like pictograms in completion menu
|
||||||
formatting = {
|
formatting = {
|
||||||
@@ -51,22 +49,3 @@ cmp.setup({
|
|||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
|
|
||||||
cmp.setup.cmdline({ "/", "?" }, {
|
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
|
||||||
sources = {
|
|
||||||
{ name = "buffer" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
|
||||||
cmp.setup.cmdline(":", {
|
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = "path" },
|
|
||||||
}, {
|
|
||||||
{ name = "cmdline" },
|
|
||||||
}),
|
|
||||||
matching = { disallow_symbol_nonprefix_matching = false },
|
|
||||||
})
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ local treesittercontext = require("treesitter-context")
|
|||||||
|
|
||||||
treesittercontext.setup({
|
treesittercontext.setup({
|
||||||
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
|
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
|
||||||
max_lines = 5, -- How many lines the window should span. Values <= 0 mean no limit.
|
max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
|
||||||
min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit.
|
min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit.
|
||||||
line_numbers = true,
|
line_numbers = true,
|
||||||
multiline_threshold = 20, -- Maximum number of lines to show for a single context
|
multiline_threshold = 20, -- Maximum number of lines to show for a single context
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ require("nvim-treesitter.configs").setup({
|
|||||||
"javascript",
|
"javascript",
|
||||||
"typescript",
|
"typescript",
|
||||||
"python",
|
"python",
|
||||||
"proto",
|
|
||||||
"c",
|
"c",
|
||||||
"lua",
|
"lua",
|
||||||
"vim",
|
"vim",
|
||||||
@@ -31,7 +30,6 @@ require("nvim-treesitter.configs").setup({
|
|||||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
||||||
-- Instead of true it can also be a list of languages
|
-- Instead of true it can also be a list of languages
|
||||||
additional_vim_regex_highlighting = false,
|
additional_vim_regex_highlighting = false,
|
||||||
disable = { "php" },
|
|
||||||
},
|
},
|
||||||
textobjects = {
|
textobjects = {
|
||||||
move = {
|
move = {
|
||||||
|
|||||||
@@ -1,20 +1,22 @@
|
|||||||
vim.g.poetv_executables = { "poetry" }
|
vim.g.poetv_executables = { "poetry", "pipenv" }
|
||||||
vim.g.poetv_auto_activate = 0
|
vim.g.poetv_auto_activate = 1
|
||||||
vim.g.poetv_set_environment = 1
|
vim.g.poetv_set_environment = 1
|
||||||
vim.g.poetv_statusline_symbol = "🐍"
|
vim.g.poetv_statusline_symbol = "🐍"
|
||||||
|
|
||||||
|
|
||||||
|
-- Keybindings
|
||||||
|
|
||||||
|
local opts = { noremap = true, silent = true }
|
||||||
|
|
||||||
|
-- Poetv: Activate Virtualenv
|
||||||
|
opts.desc = "Poetv: Activate virtualenv"
|
||||||
|
vim.keymap.set("n", "<leader>pva", "<cmd>PoetvActivate<CR>", opts)
|
||||||
|
|
||||||
|
-- Poetv: Deactivate Virtualenv
|
||||||
|
opts.desc = "Poetv: Deactivate virtualenv"
|
||||||
|
vim.keymap.set("n", "<leader>pvd", "<cmd>PoetvDeactivate<CR>", opts)
|
||||||
|
|
||||||
-- Setup Autocommands
|
-- Setup Autocommands
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
|
vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" },
|
||||||
pattern = { "*/.venv/*", "*.py" },
|
{ pattern = { "*/.venv/*", "*.py" }, callback = function() vim.cmd([[ PoetvActivate]]) end })
|
||||||
callback = function()
|
|
||||||
-- check if poetv is activated
|
|
||||||
|
|
||||||
if vim.g.poetv_name ~= nil then
|
|
||||||
return
|
|
||||||
else
|
|
||||||
vim.cmd([[ PoetvActivate ]])
|
|
||||||
vim.cmd([[ LspRestart ]])
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
local smear_cursor = require("smear_cursor")
|
|
||||||
|
|
||||||
smear_cursor.setup({
|
|
||||||
stiffness = 0.5,
|
|
||||||
trailing_stiffness = 0.49,
|
|
||||||
never_draw_over_target = false,
|
|
||||||
smear_insert_mode = false,
|
|
||||||
smear_between_buffers = true,
|
|
||||||
cursor_color = "#7DF9FF",
|
|
||||||
})
|
|
||||||
@@ -2,40 +2,10 @@ local telescope = require("telescope")
|
|||||||
local builtin = require("telescope.builtin")
|
local builtin = require("telescope.builtin")
|
||||||
local actions = require("telescope.actions")
|
local actions = require("telescope.actions")
|
||||||
local trouble = require("trouble.sources.telescope")
|
local trouble = require("trouble.sources.telescope")
|
||||||
local file_browser_actions = require("telescope._extensions.file_browser.actions")
|
|
||||||
local live_grep_shortcuts = require("telescope-live-grep-args.shortcuts")
|
|
||||||
local live_grep_actions = require("telescope-live-grep-args.actions")
|
|
||||||
|
|
||||||
local image_preview = require("absolute.utils.telescope_image_preview")
|
|
||||||
|
|
||||||
-- local function chafa_previewer_mime_hook(filepath, bufnr, opts)
|
|
||||||
-- local is_image = function(current_filepath)
|
|
||||||
-- local image_extensions = { "png", "jpg", "jpeg", "gif" } -- Supported image formats
|
|
||||||
-- local split_path = vim.split(current_filepath:lower(), ".", { plain = true })
|
|
||||||
-- local extension = split_path[#split_path]
|
|
||||||
-- return vim.tbl_contains(image_extensions, extension)
|
|
||||||
-- end
|
|
||||||
-- if is_image(filepath) then
|
|
||||||
-- local term = vim.api.nvim_open_term(bufnr, {})
|
|
||||||
-- local function send_output(_, data, _)
|
|
||||||
-- for _, d in ipairs(data) do
|
|
||||||
-- vim.api.nvim_chan_send(term, d .. "\r\n")
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
-- vim.fn.jobstart("chafa --passthrough tmux --exact-size off --format=symbols " .. filepath, {
|
|
||||||
-- on_stdout = send_output,
|
|
||||||
-- stdout_buffered = true,
|
|
||||||
-- })
|
|
||||||
-- else
|
|
||||||
-- require("telescope.previewers.utils").set_preview_message(bufnr, opts.winid, "Binary cannot be previewed")
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
|
|
||||||
telescope.setup({
|
telescope.setup({
|
||||||
defaults = {
|
defaults = {
|
||||||
file_previewer = image_preview.file_previewer,
|
|
||||||
buffer_previewer_maker = image_preview.buffer_previewer_maker,
|
|
||||||
|
|
||||||
vimgrep_arguments = {
|
vimgrep_arguments = {
|
||||||
"rg",
|
"rg",
|
||||||
"--color=never",
|
"--color=never",
|
||||||
@@ -44,9 +14,6 @@ telescope.setup({
|
|||||||
"--line-number",
|
"--line-number",
|
||||||
"--column",
|
"--column",
|
||||||
"--smart-case",
|
"--smart-case",
|
||||||
"--follow",
|
|
||||||
"--hidden",
|
|
||||||
"--glob=!.git/",
|
|
||||||
},
|
},
|
||||||
mappings = {
|
mappings = {
|
||||||
i = {
|
i = {
|
||||||
@@ -60,77 +27,25 @@ telescope.setup({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
extensions = {
|
extensions = {
|
||||||
media_files = {
|
|
||||||
filetypes = { "png", "webp", "jpg", "jpeg", "svg" },
|
|
||||||
find_cmd = "rg",
|
|
||||||
},
|
|
||||||
live_grep_args = {
|
|
||||||
auto_quoting = false,
|
|
||||||
mappings = {
|
|
||||||
i = {
|
|
||||||
["C-space"] = live_grep_actions.to_fuzzy_refine,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
file_browser = {
|
file_browser = {
|
||||||
hijack_netrw = true,
|
hijack_netrw = true,
|
||||||
hide_parent_dir = true,
|
hide_parent_dir = true,
|
||||||
depth = 1,
|
depth = 1,
|
||||||
respect_gitignore = vim.fn.executable("fd") == 1,
|
respect_gitignore = false,
|
||||||
hidden = { file_browser = true, folder_browser = false },
|
auto_depth = true,
|
||||||
auto_depth = false,
|
|
||||||
browse_files = require("telescope._extensions.file_browser.finders").browse_files,
|
|
||||||
display_stat = {
|
display_stat = {
|
||||||
date = true,
|
date = true,
|
||||||
size = true,
|
size = true,
|
||||||
mode = false,
|
mode = false,
|
||||||
},
|
},
|
||||||
use_fd = true,
|
|
||||||
git_status = true,
|
|
||||||
mappings = {
|
|
||||||
["i"] = {
|
|
||||||
["<A-c>"] = file_browser_actions.create,
|
|
||||||
["<S-CR>"] = file_browser_actions.create_from_prompt,
|
|
||||||
["<A-r>"] = file_browser_actions.rename,
|
|
||||||
["<A-m>"] = file_browser_actions.move,
|
|
||||||
["<A-y>"] = file_browser_actions.copy,
|
|
||||||
["<A-d>"] = file_browser_actions.remove,
|
|
||||||
["<C-o>"] = file_browser_actions.open,
|
|
||||||
["<C-g>"] = file_browser_actions.goto_parent_dir,
|
|
||||||
["<C-e>"] = file_browser_actions.goto_home_dir,
|
|
||||||
["<C-w>"] = file_browser_actions.goto_cwd,
|
|
||||||
["<C-t>"] = file_browser_actions.change_cwd,
|
|
||||||
["<C-f>"] = file_browser_actions.toggle_browser,
|
|
||||||
["<C-h>"] = file_browser_actions.toggle_hidden,
|
|
||||||
["<C-s>"] = file_browser_actions.toggle_all,
|
|
||||||
["<bs>"] = file_browser_actions.backspace,
|
|
||||||
},
|
|
||||||
["n"] = {
|
|
||||||
["c"] = file_browser_actions.create,
|
|
||||||
["r"] = file_browser_actions.rename,
|
|
||||||
["m"] = file_browser_actions.move,
|
|
||||||
["y"] = file_browser_actions.copy,
|
|
||||||
["d"] = file_browser_actions.remove,
|
|
||||||
["o"] = file_browser_actions.open,
|
|
||||||
["g"] = file_browser_actions.goto_parent_dir,
|
|
||||||
["e"] = file_browser_actions.goto_home_dir,
|
|
||||||
["w"] = file_browser_actions.goto_cwd,
|
|
||||||
["t"] = file_browser_actions.change_cwd,
|
|
||||||
["f"] = file_browser_actions.toggle_browser,
|
|
||||||
["h"] = file_browser_actions.toggle_hidden,
|
|
||||||
["s"] = file_browser_actions.toggle_all,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
telescope.load_extension("live_grep_args")
|
|
||||||
telescope.load_extension("file_browser")
|
telescope.load_extension("file_browser")
|
||||||
telescope.load_extension("media_files")
|
telescope.load_extension("flutter")
|
||||||
telescope.load_extension("themes")
|
|
||||||
telescope.load_extension("dap")
|
telescope.load_extension("dap")
|
||||||
|
telescope.load_extension("themes")
|
||||||
|
|
||||||
local find_files = function()
|
local find_files = function()
|
||||||
builtin.find_files({
|
builtin.find_files({
|
||||||
@@ -138,45 +53,24 @@ local find_files = function()
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
local default_grep_files = function()
|
|
||||||
local input = vim.fn.input("[Global Search]: ")
|
|
||||||
local trimmed_input = vim.fn.trim(input)
|
|
||||||
|
|
||||||
-- Check the length of the input
|
|
||||||
|
|
||||||
local live_grep_args = telescope.extensions.live_grep_args
|
|
||||||
-- If the input is empty open the search prompt
|
|
||||||
|
|
||||||
if trimmed_input == "" then
|
|
||||||
live_grep_args.live_grep_args()
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
builtin.grep_string({ search = trimmed_input })
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Function to get the visually selected text
|
|
||||||
|
|
||||||
-- Pipe the visual selection into Telescope find_files
|
|
||||||
local opts = { noremap = true, silent = true }
|
local opts = { noremap = true, silent = true }
|
||||||
|
|
||||||
opts.desc = "Open file browser (cwd)"
|
opts.desc = "Open file browser (cwd)"
|
||||||
vim.keymap.set("n", "<leader>pf", "<cmd>Telescope file_browser<CR>", opts)
|
vim.keymap.set("n", "<leader>af", "<cmd>Telescope file_browser<CR>", opts)
|
||||||
|
|
||||||
opts.desc = "Open file browser (current file)"
|
opts.desc = "Open file browser (current file)"
|
||||||
vim.keymap.set("n", "<leader>cf", "<cmd>Telescope file_browser path=%:p:h select_buffer=true<CR>", opts)
|
vim.keymap.set("n", "<leader>cf", "<cmd>Telescope file_browser path=%:p:h select_buffer=true<CR>", opts)
|
||||||
|
|
||||||
opts.desc = "Fuzzy find files (cwd)"
|
opts.desc = "Fuzzy find files (cwd)"
|
||||||
vim.keymap.set("n", "<C-p>", find_files, opts)
|
vim.keymap.set("n", "<leader>pf", find_files, opts)
|
||||||
|
|
||||||
opts.desc = "Fuzzy find recent files"
|
opts.desc = "Fuzzy find recent files"
|
||||||
vim.keymap.set("n", "<leader>pr", builtin.oldfiles, opts)
|
vim.keymap.set("n", "<leader>pr", builtin.oldfiles, opts)
|
||||||
|
|
||||||
opts.desc = "Fuzzy find files in git in cwd"
|
opts.desc = "Fuzzy find files in git in cwd"
|
||||||
vim.keymap.set("n", "<leader>gf", builtin.git_files, opts)
|
vim.keymap.set("n", "<C-p>", builtin.git_files, opts)
|
||||||
|
|
||||||
opts.desc = "Fuzzy find files in cwd"
|
opts.desc = "Fuzzy find string under cursor in cwd"
|
||||||
vim.keymap.set("n", "<leader>ps", default_grep_files, opts)
|
vim.keymap.set("n", "<leader>ps", function()
|
||||||
|
builtin.grep_string({ search = vim.fn.input("Grep > ") })
|
||||||
opts.desc = "Fuzzy find word under cursor in cwd"
|
end, opts)
|
||||||
vim.keymap.set("n", "<leader>sb", live_grep_shortcuts.grep_word_under_cursor, opts)
|
|
||||||
|
|||||||
@@ -29,34 +29,8 @@ function _LAZYGIT_TOGGLE()
|
|||||||
lazygit:toggle()
|
lazygit:toggle()
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Todo prompt model to run
|
|
||||||
local ollama = Terminal:new({
|
|
||||||
cmd = "ollama run llama3",
|
|
||||||
dir = "git_dir",
|
|
||||||
direction = "float",
|
|
||||||
float_opts = {
|
|
||||||
border = "double",
|
|
||||||
},
|
|
||||||
-- function to run on opening the terminal
|
|
||||||
on_open = function(term)
|
|
||||||
vim.cmd("startinsert!")
|
|
||||||
vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "<cmd>close<CR>", opts)
|
|
||||||
end,
|
|
||||||
-- function to run on closing the terminal
|
|
||||||
on_close = function(term)
|
|
||||||
vim.cmd("startinsert!")
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
function _OLLAMA_TOGGLE()
|
|
||||||
ollama:toggle()
|
|
||||||
end
|
|
||||||
|
|
||||||
opts.desc = "Open lazygit"
|
opts.desc = "Open lazygit"
|
||||||
vim.api.nvim_set_keymap("n", "<leader>gs", "<cmd>lua _LAZYGIT_TOGGLE()<CR>", opts)
|
vim.api.nvim_set_keymap("n", "<leader>gs", "<cmd>lua _LAZYGIT_TOGGLE()<CR>", opts)
|
||||||
|
|
||||||
opts.desc = "Open ollama"
|
|
||||||
vim.api.nvim_set_keymap("n", "<leader>ol", "<cmd>lua _OLLAMA_TOGGLE()<CR>", opts)
|
|
||||||
|
|
||||||
-- opts.desc = "Open a terminal"
|
-- opts.desc = "Open a terminal"
|
||||||
-- vim.api.nvim_set_keymap("n", "<C-`>", "<cmd>ToggleTerm<CR>", opts)
|
-- vim.api.nvim_set_keymap("n", "<C-`>", "<cmd>ToggleTerm<CR>", opts)
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
local venvSelector = require("venv-selector")
|
|
||||||
|
|
||||||
venvSelector.setup({
|
|
||||||
-- name = "venv",
|
|
||||||
auto_refresh = false,
|
|
||||||
})
|
|
||||||
|
|
||||||
local opts = { noremap = true, silent = true }
|
|
||||||
|
|
||||||
opts.desc = "Open VenvSelector to pick a venv."
|
|
||||||
vim.api.nvim_set_keymap("n", "<leader>vs", "<cmd>VenvSelect<cr>", opts)
|
|
||||||
|
|
||||||
opts.desc = "Retrieve the venv from a cache."
|
|
||||||
vim.api.nvim_set_keymap("n", "<leader>vc", "<cmd>VenvSelectCached<cr>", opts)
|
|
||||||
@@ -7,19 +7,18 @@ local function SetupWindowPreferences()
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Set the Normal group with dynamic blend
|
-- Set the Normal group with dynamic blend
|
||||||
local normal_blend = get_blend_value("Normal", 0)
|
local normal_blend = get_blend_value("Normal", 50)
|
||||||
vim.api.nvim_set_hl(0, "Normal", { bg = "none", blend = normal_blend })
|
vim.api.nvim_set_hl(0, "Normal", { bg = "none", blend = normal_blend })
|
||||||
|
|
||||||
-- Set the NormalFloat group with dynamic blend
|
-- Set the NormalFloat group with dynamic blend
|
||||||
local normal_float_blend = get_blend_value("NormalFloat", 0)
|
local normal_float_blend = get_blend_value("NormalFloat", 50)
|
||||||
vim.api.nvim_set_hl(1, "NormalFloat", { bg = "none", blend = normal_float_blend })
|
vim.api.nvim_set_hl(1, "NormalFloat", { bg = "none", blend = normal_float_blend })
|
||||||
|
|
||||||
-- Set the NormalNC group with dynamic blend
|
-- Set the NormalNC group with dynamic blend
|
||||||
local normal_nc_blend = get_blend_value("NormalNC", 0)
|
local normal_nc_blend = get_blend_value("NormalNC", 50)
|
||||||
vim.api.nvim_set_hl(0, "NormalNC", { bg = "none", blend = normal_nc_blend })
|
vim.api.nvim_set_hl(0, "NormalNC", { bg = "none", blend = normal_nc_blend })
|
||||||
end
|
end
|
||||||
|
|
||||||
local function SyncWezTerm()
|
|
||||||
local colorschemes = {
|
local colorschemes = {
|
||||||
["tokyonight-day"] = "Tokyo Night Day",
|
["tokyonight-day"] = "Tokyo Night Day",
|
||||||
["tokyonight-night"] = "Tokyo Night Night",
|
["tokyonight-night"] = "Tokyo Night Night",
|
||||||
@@ -31,6 +30,7 @@ local function SyncWezTerm()
|
|||||||
["catppuccin-mocha"] = "Catppuccin Mocha",
|
["catppuccin-mocha"] = "Catppuccin Mocha",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local function SyncWezTerm()
|
||||||
vim.api.nvim_create_autocmd("ColorScheme", {
|
vim.api.nvim_create_autocmd("ColorScheme", {
|
||||||
group = vim.api.nvim_create_augroup("wezterm_colorscheme", { clear = true }),
|
group = vim.api.nvim_create_augroup("wezterm_colorscheme", { clear = true }),
|
||||||
callback = function(args)
|
callback = function(args)
|
||||||
@@ -41,19 +41,11 @@ local function SyncWezTerm()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- if the file does not exists, exit early
|
|
||||||
local filename = vim.fn.expand("$XDG_CONFIG_HOME/wezterm/colorscheme")
|
|
||||||
if not vim.fn.filereadable(filename) then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Write the colorscheme to a file
|
-- Write the colorscheme to a file
|
||||||
|
local filename = vim.fn.expand("$XDG_CONFIG_HOME/wezterm/colorscheme")
|
||||||
assert(type(filename) == "string")
|
assert(type(filename) == "string")
|
||||||
|
|
||||||
local file = io.open(filename, "w")
|
local file = io.open(filename, "w")
|
||||||
|
|
||||||
assert(file)
|
assert(file)
|
||||||
|
|
||||||
file:write(colorscheme)
|
file:write(colorscheme)
|
||||||
file:close()
|
file:close()
|
||||||
-- vim.notify("Setting WezTerm color scheme to " .. colorscheme, vim.log.levels.INFO)
|
-- vim.notify("Setting WezTerm color scheme to " .. colorscheme, vim.log.levels.INFO)
|
||||||
@@ -61,93 +53,9 @@ local function SyncWezTerm()
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
local function SyncGhostyTerm()
|
|
||||||
vim.api.nvim_create_user_command("SendCmdShiftComma", function()
|
|
||||||
os.execute(
|
|
||||||
'osascript -e \'tell application "System Events" to keystroke "," using {command down, shift down}\''
|
|
||||||
)
|
|
||||||
end, {})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("ColorScheme", {
|
|
||||||
group = vim.api.nvim_create_augroup("ghostty_colorscheme", { clear = true }),
|
|
||||||
callback = function(args)
|
|
||||||
SetupWindowPreferences()
|
|
||||||
|
|
||||||
local notifyOpts = { title = "Set Ghostty Theme" }
|
|
||||||
|
|
||||||
-- if the file does not exists, exit early
|
|
||||||
|
|
||||||
local filename = vim.fn.expand("$XDG_CONFIG_HOME/ghostty/colorscheme")
|
|
||||||
if not vim.fn.filereadable(filename) then
|
|
||||||
vim.notify("Ghostty colorscheme file not found", vim.log.levels.ERROR, notifyOpts)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- lets check if ghostty supports the theme
|
|
||||||
-- ghostty +list-themes | xargs -I {} echo {} | grep <theme>
|
|
||||||
|
|
||||||
local cmd = "ghostty +list-themes | sed 's/ (resources)//g' | grep '^" .. args.match .. "$'"
|
|
||||||
|
|
||||||
local status = vim.fn.system(cmd)
|
|
||||||
local trimmed_output = vim.fn.substitute(status, "^s+|s+$", "", "g")
|
|
||||||
-- check if status is empty
|
|
||||||
|
|
||||||
if trimmed_output == "" then
|
|
||||||
vim.notify(args.match .. " is not supported by Ghostty", vim.log.levels.ERROR, notifyOpts)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
assert(type(filename) == "string")
|
|
||||||
|
|
||||||
local file = io.open(filename, "w")
|
|
||||||
|
|
||||||
assert(file)
|
|
||||||
|
|
||||||
local theme_string = 'theme = "' .. args.match .. '"'
|
|
||||||
|
|
||||||
file:write(theme_string)
|
|
||||||
file:close()
|
|
||||||
|
|
||||||
vim.cmd([[SendCmdShiftComma]])
|
|
||||||
|
|
||||||
-- send a key combination to reload the theme
|
|
||||||
-- cmd + shift + ,
|
|
||||||
-- vim.api.nvim_feedkeys("<Cmd-Shift-,>", "n", true)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
local function is_wezterm()
|
|
||||||
return os.getenv("TERM_PROGRAM") == "WezTerm"
|
|
||||||
or os.getenv("WEZTERM_EXECUTABLE") ~= nil
|
|
||||||
or vim.fn.executable("wezterm") == 1
|
|
||||||
end
|
|
||||||
|
|
||||||
local function is_ghostty()
|
|
||||||
return os.getenv("TERM_PROGRAM") == "Ghostty"
|
|
||||||
or os.getenv("GHOSTTY_EXECUTABLE") ~= nil
|
|
||||||
or vim.fn.executable("ghostty") == 1
|
|
||||||
end
|
|
||||||
|
|
||||||
local function SetupAutocommands()
|
|
||||||
-- Setup Autocommand if wezterm is available in the system
|
-- Setup Autocommand if wezterm is available in the system
|
||||||
if is_wezterm() then
|
if vim.fn.executable("wezterm") == 1 then
|
||||||
SyncWezTerm()
|
SyncWezTerm()
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Setup Autommand if the terminal is Ghostty
|
|
||||||
if is_ghostty() then
|
|
||||||
SyncGhostyTerm()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
SetupWindowPreferences()
|
SetupWindowPreferences()
|
||||||
SetupAutocommands()
|
|
||||||
|
|
||||||
local opts = { noremap = true, silent = true }
|
|
||||||
|
|
||||||
opts.desc = "Fuzzy find colorschemes"
|
|
||||||
vim.api.nvim_set_keymap("n", "<leader>cs", "<cmd>Telescope colorscheme<CR>", opts)
|
|
||||||
|
|
||||||
opts.desc = "Fuzzy find themes"
|
|
||||||
vim.api.nvim_set_keymap("n", "<leader>th", "<cmd>Telescope themes<CR>", opts)
|
|
||||||
|
|||||||
@@ -2,14 +2,11 @@ local lua_utils = require("absolute.utils.detect-lua")
|
|||||||
|
|
||||||
package.path = package.path .. lua_utils.GetLatestLuaVersion()
|
package.path = package.path .. lua_utils.GetLatestLuaVersion()
|
||||||
|
|
||||||
local current_home = os.getenv("HOME")
|
|
||||||
|
|
||||||
vim.g.python3_host_prog = current_home .. "/.pyenv/versions/py3nvim/bin/python"
|
|
||||||
|
|
||||||
-- disable nvim intro
|
-- disable nvim intro
|
||||||
vim.opt.shortmess:append("sI")
|
vim.opt.shortmess:append "sI"
|
||||||
|
|
||||||
vim.opt.shell = "zsh"
|
|
||||||
|
|
||||||
vim.opt.nu = true
|
vim.opt.nu = true
|
||||||
vim.opt.relativenumber = true
|
vim.opt.relativenumber = true
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
local lua_utils = require("absolute.utils.detect-lua")
|
|
||||||
|
|
||||||
package.path = package.path .. lua_utils.GetLatestLuaVersion()
|
|
||||||
|
|
||||||
require("absolute.core")
|
require("absolute.core")
|
||||||
require("absolute.lazy")
|
require("absolute.lazy")
|
||||||
require("absolute.helpers")
|
require("absolute.helpers")
|
||||||
require("absolute.remap")
|
require("absolute.remap")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
return {
|
|
||||||
default_config = {
|
|
||||||
cmd = { "pb", "lsp" },
|
|
||||||
filetypes = { "proto" },
|
|
||||||
single_file_support = true,
|
|
||||||
root_dir = require("lspconfig.util").root_pattern(".git"),
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
return {
|
return {
|
||||||
"https://github.com/apple/pkl-neovim",
|
"https://github.com/apple/pkl-neovim",
|
||||||
enabled = false,
|
|
||||||
lazy = true,
|
lazy = true,
|
||||||
event = "BufReadPre *.pkl",
|
event = "BufReadPre *.pkl",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
return {
|
|
||||||
"olimorris/codecompanion.nvim",
|
|
||||||
dependencies = {
|
|
||||||
"ravitemer/mcphub.nvim",
|
|
||||||
"nvim-lua/plenary.nvim",
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require("absolute.after.codecompanion")
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
return {
|
return {
|
||||||
"github/copilot.vim",
|
"github/copilot.vim"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,12 @@ return {
|
|||||||
"rcarriga/nvim-dap-ui",
|
"rcarriga/nvim-dap-ui",
|
||||||
"nvim-neotest/nvim-nio",
|
"nvim-neotest/nvim-nio",
|
||||||
"nvim-telescope/telescope-dap.nvim",
|
"nvim-telescope/telescope-dap.nvim",
|
||||||
|
{
|
||||||
|
"mfussenegger/nvim-dap-python",
|
||||||
|
ft = "python",
|
||||||
|
dependencies = { "mfussenegger/nvim-dap" },
|
||||||
|
},
|
||||||
|
-- "Pocco81/DAPInstall.nvim"
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("absolute.after.dap")
|
require("absolute.after.dap")
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
return {
|
||||||
|
"nvimdev/dashboard-nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-tree/nvim-web-devicons"
|
||||||
|
},
|
||||||
|
event = "VimEnter",
|
||||||
|
config = function()
|
||||||
|
require("absolute.after.dashboard")
|
||||||
|
end
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
return {
|
return {
|
||||||
"akinsho/flutter-tools.nvim",
|
'akinsho/flutter-tools.nvim',
|
||||||
enabled = false,
|
|
||||||
lazy = false,
|
lazy = false,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
'nvim-lua/plenary.nvim',
|
||||||
"stevearc/dressing.nvim", -- optional for vim.ui.select
|
'stevearc/dressing.nvim', -- optional for vim.ui.select
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("absolute.after.flutter-tools")
|
require("absolute.after.flutter-tools")
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
return {
|
|
||||||
"David-Kunz/gen.nvim",
|
|
||||||
enabled = false,
|
|
||||||
config = function()
|
|
||||||
require("absolute.after.gen")
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
"theprimeagen/harpoon",
|
||||||
|
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||||
|
config = function()
|
||||||
|
require("absolute.after.harpoon")
|
||||||
|
end
|
||||||
|
}
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
return {
|
|
||||||
"3rd/image.nvim",
|
|
||||||
config = function()
|
|
||||||
require("absolute.after.image")
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
"jokajak/keyseer.nvim",
|
||||||
|
version = "*",
|
||||||
|
config = function()
|
||||||
|
require("absolute.after.keyseer")
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
return {
|
|
||||||
"huggingface/llm.nvim",
|
|
||||||
enabled = false,
|
|
||||||
config = function()
|
|
||||||
require("absolute.after.llm")
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
return {
|
|
||||||
"OXY2DEV/markview.nvim",
|
|
||||||
lazy = false,
|
|
||||||
opts = {
|
|
||||||
preview = {
|
|
||||||
filetypes = { "markdown", "codecompanion" },
|
|
||||||
ignore_buftypes = {},
|
|
||||||
},
|
|
||||||
experimental = { check_rtp_message = false },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,11 +1,17 @@
|
|||||||
return {
|
return {
|
||||||
"mason-org/mason.nvim",
|
'williamboman/mason.nvim',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"mason-org/mason-registry",
|
'williamboman/mason-lspconfig.nvim',
|
||||||
"mason-org/mason-lspconfig.nvim",
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"jay-babu/mason-nvim-dap.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"mfussenegger/nvim-dap",
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("absolute.after.mason")
|
require("absolute.after.mason")
|
||||||
end,
|
end
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
return {
|
|
||||||
"echasnovski/mini.diff",
|
|
||||||
config = function()
|
|
||||||
require("absolute.after.mini-diff")
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
return {
|
return {
|
||||||
"echasnovski/mini.nvim",
|
"echasnovski/mini.nvim",
|
||||||
enabled = false,
|
|
||||||
version = "*", -- Stable Version
|
version = "*", -- Stable Version
|
||||||
config = function()
|
config = function()
|
||||||
require("absolute.after.mini")
|
require("absolute.after.mini")
|
||||||
end,
|
end
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
return {
|
||||||
|
"folke/noice.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
dependencies = {
|
||||||
|
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
-- OPTIONAL:
|
||||||
|
-- `nvim-notify` is only needed, if you want to use the notification view.
|
||||||
|
-- If not available, we use `mini` as the fallback
|
||||||
|
"rcarriga/nvim-notify",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("absolute.after.noice")
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
"nvimtools/none-ls.nvim",
|
||||||
|
config = function()
|
||||||
|
require("absolute.after.none-ls")
|
||||||
|
end
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
return {
|
|
||||||
"rcarriga/nvim-notify",
|
|
||||||
lazy = false,
|
|
||||||
priority = 1000,
|
|
||||||
config = function()
|
|
||||||
require("absolute.after.notify")
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
return {
|
return {
|
||||||
"kylechui/nvim-surround",
|
"kylechui/nvim-surround",
|
||||||
enabled = false,
|
|
||||||
version = "*", -- Use for stability; omit to use `main` branch for the latest features
|
version = "*", -- Use for stability; omit to use `main` branch for the latest features
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
config = function()
|
config = function()
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
return {
|
return {
|
||||||
enabled = true,
|
|
||||||
"nvim-treesitter/nvim-treesitter-context",
|
"nvim-treesitter/nvim-treesitter-context",
|
||||||
config = function()
|
config = function()
|
||||||
require("absolute.after.nvim-treesitter-context")
|
require("absolute.after.nvim-treesitter-context")
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
return {
|
return {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
dependencies = {
|
|
||||||
"OXY2DEV/markview.nvim",
|
|
||||||
},
|
|
||||||
config = function()
|
config = function()
|
||||||
vim.cmd([[:silent !TSUpdate]])
|
vim.cmd([[:silent !TSUpdate]])
|
||||||
require("absolute.after.nvim-treesitter")
|
require("absolute.after.nvim-treesitter")
|
||||||
end,
|
end
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
return {
|
return {
|
||||||
enabled = false,
|
|
||||||
"petobens/poet-v",
|
"petobens/poet-v",
|
||||||
|
lazy = true,
|
||||||
|
ft = "py",
|
||||||
config = function()
|
config = function()
|
||||||
require("absolute.after.poet-v")
|
require("absolute.after.poet-v")
|
||||||
end,
|
end,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
return {
|
|
||||||
"MeanderingProgrammer/render-markdown.nvim",
|
|
||||||
ft = { "markdown", "codecompanion" }
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
return {
|
|
||||||
enabled = false,
|
|
||||||
"sphamba/smear-cursor.nvim",
|
|
||||||
config = function()
|
|
||||||
require("absolute.after.smear-cursor")
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
return {
|
return {
|
||||||
enabled = false,
|
|
||||||
"laytan/tailwind-sorter.nvim",
|
"laytan/tailwind-sorter.nvim",
|
||||||
dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-lua/plenary.nvim" },
|
dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-lua/plenary.nvim" },
|
||||||
build = "cd formatter && npm i && npm run build",
|
build = "cd formatter && npm i && npm run build",
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
"nvim-telescope/telescope-file-browser.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
"nvim-lua/plenary.nvim"
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,21 +1,12 @@
|
|||||||
return {
|
return {
|
||||||
"nvim-telescope/telescope.nvim",
|
'nvim-telescope/telescope.nvim',
|
||||||
branch = "0.1.x",
|
branch = '0.1.x',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/popup.nvim",
|
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
"nvim-telescope/telescope-dap.nvim",
|
"nvim-telescope/telescope-dap.nvim",
|
||||||
"andrew-george/telescope-themes",
|
"andrew-george/telescope-themes",
|
||||||
"nvim-telescope/telescope-media-files.nvim",
|
|
||||||
"nvim-telescope/telescope-file-browser.nvim",
|
|
||||||
{
|
|
||||||
"nvim-telescope/telescope-live-grep-args.nvim",
|
|
||||||
-- This will not install any breaking changes.
|
|
||||||
-- For major updates, this must be adjusted manually.
|
|
||||||
version = "^1.0.0",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("absolute.after.telescope")
|
require("absolute.after.telescope")
|
||||||
end,
|
end
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
return {
|
|
||||||
"bezhermoso/tree-sitter-ghostty",
|
|
||||||
build = "make nvim_install",
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
return {
|
|
||||||
"linux-cultist/venv-selector.nvim",
|
|
||||||
lazy = false,
|
|
||||||
branch = "regexp", -- This is the regexp branch, use this for the new version
|
|
||||||
dependencies = {
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
"nvim-telescope/telescope.nvim",
|
|
||||||
"mfussenegger/nvim-dap-python",
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require("absolute.after.venv-selector")
|
|
||||||
end,
|
|
||||||
event = "VeryLazy", -- Optional: needed only if you want to type `:VenvSelect` without a keymapping
|
|
||||||
}
|
|
||||||
@@ -1,17 +1,17 @@
|
|||||||
return {
|
return {
|
||||||
"alexghergh/nvim-tmux-navigation",
|
"christoomey/vim-tmux-navigator",
|
||||||
config = function()
|
cmd = {
|
||||||
local nvim_tmux_nav = require("nvim-tmux-navigation")
|
"TmuxNavigateLeft",
|
||||||
|
"TmuxNavigateDown",
|
||||||
nvim_tmux_nav.setup({
|
"TmuxNavigateUp",
|
||||||
disable_when_zoomed = true, -- defaults to false
|
"TmuxNavigateRight",
|
||||||
})
|
"TmuxNavigatePrevious",
|
||||||
|
},
|
||||||
vim.keymap.set("n", "<C-h>", nvim_tmux_nav.NvimTmuxNavigateLeft)
|
keys = {
|
||||||
vim.keymap.set("n", "<C-j>", nvim_tmux_nav.NvimTmuxNavigateDown)
|
{ "<C-h>", "<cmd><C-U>TmuxNavigateLeft<CR>" },
|
||||||
vim.keymap.set("n", "<C-k>", nvim_tmux_nav.NvimTmuxNavigateUp)
|
{ "<C-j>", "<cmd><C-U>TmuxNavigateDown<CR>" },
|
||||||
vim.keymap.set("n", "<C-l>", nvim_tmux_nav.NvimTmuxNavigateRight)
|
{ "<C-k>", "<cmd><C-U>TmuxNavigateUp<CR>" },
|
||||||
vim.keymap.set("n", "<C-\\>", nvim_tmux_nav.NvimTmuxNavigateLastActive)
|
{ "<C-l>", "<cmd><C-U>TmuxNavigateRight<CR>" },
|
||||||
vim.keymap.set("n", "<C-Space>", nvim_tmux_nav.NvimTmuxNavigateNext)
|
{ "<C-\\>", "<cmd><C-U>TmuxNavigatePrevious<CR>" },
|
||||||
end,
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
+25
-29
@@ -1,7 +1,7 @@
|
|||||||
local opts = {
|
local opts = { noremap = true, silent = true }
|
||||||
noremap = true,
|
|
||||||
silent = true,
|
opts.desc = "Show Cheatsheet"
|
||||||
}
|
vim.keymap.set("n", "<leader>\\", "<cmd>Cheatsheet<CR>", opts) -- toggle file explorer
|
||||||
|
|
||||||
opts.desc = "Show Keymap"
|
opts.desc = "Show Keymap"
|
||||||
vim.keymap.set("n", "<leader>?", "<cmd>Telescope keymaps<CR>", opts) -- toggle file explorer
|
vim.keymap.set("n", "<leader>?", "<cmd>Telescope keymaps<CR>", opts) -- toggle file explorer
|
||||||
@@ -53,6 +53,10 @@ vim.keymap.set("n", "<leader>Y", [["+Y]], opts)
|
|||||||
opts.desc = "Delete current line (blackhole)"
|
opts.desc = "Delete current line (blackhole)"
|
||||||
vim.keymap.set({ "n", "v" }, "<leader>d", [["_d]], opts)
|
vim.keymap.set({ "n", "v" }, "<leader>d", [["_d]], opts)
|
||||||
|
|
||||||
|
-- Alternate Escape (Easy to Reach)
|
||||||
|
opts.desc = "Alternate Escape (Easy to Reach)"
|
||||||
|
vim.keymap.set("i", "<C-c>", "<Esc>", opts)
|
||||||
|
|
||||||
-- Disable Q - Nothing Good Ever Happens
|
-- Disable Q - Nothing Good Ever Happens
|
||||||
-- Q is normally used to enable Ex mode. We dont want that
|
-- Q is normally used to enable Ex mode. We dont want that
|
||||||
opts.desc = "Disable Q - Nothing Good Ever Happens"
|
opts.desc = "Disable Q - Nothing Good Ever Happens"
|
||||||
@@ -72,6 +76,7 @@ vim.keymap.set("n", "<leader>k", "<cmd>lnext<CR>zz", opts)
|
|||||||
opts.desc = "Jump to previous location and center screen"
|
opts.desc = "Jump to previous location and center screen"
|
||||||
vim.keymap.set("n", "<leader>j", "<cmd>lprev<CR>zz", opts)
|
vim.keymap.set("n", "<leader>j", "<cmd>lprev<CR>zz", opts)
|
||||||
|
|
||||||
|
|
||||||
-- Search Regex Keymap
|
-- Search Regex Keymap
|
||||||
opts.desc = "Regex Replace"
|
opts.desc = "Regex Replace"
|
||||||
vim.keymap.set("n", "<leader>sr", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]], opts)
|
vim.keymap.set("n", "<leader>sr", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]], opts)
|
||||||
@@ -79,31 +84,22 @@ vim.keymap.set("n", "<leader>sr", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left>
|
|||||||
opts.desc = "Replace selected text"
|
opts.desc = "Replace selected text"
|
||||||
vim.keymap.set("v", "<leader>ss", [[:s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]], opts)
|
vim.keymap.set("v", "<leader>ss", [[:s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]], opts)
|
||||||
|
|
||||||
-- -- Source File Keymap
|
-- Source File Keymap
|
||||||
-- opts.desc = "Source File"
|
opts.desc = "Source File"
|
||||||
-- vim.keymap.set("n", "<leader><leader>", function()
|
vim.keymap.set("n", "<leader><leader>", function()
|
||||||
-- -- Only source these file extensions
|
-- Only source these file extensions
|
||||||
-- local allowed_extensions = [[
|
local allowed_extensions = [[".vim", ".lua", ".vimrc", ".gvimrc", ".nvim", ".nvimrc", ".sh"]]
|
||||||
-- ".vim",
|
|
||||||
-- ".lua",
|
-- Get the file extension
|
||||||
-- ".vimrc",
|
local file_extension = vim.fn.expand("%:e")
|
||||||
-- ".gvimrc",
|
|
||||||
-- ".nvim",
|
-- Check if the file extension is allowed
|
||||||
-- ".nvimrc",
|
if string.find(allowed_extensions, file_extension) then
|
||||||
-- ".sh"
|
vim.cmd("so %")
|
||||||
-- ]]
|
else
|
||||||
--
|
vim.notify("Filetype not supported", vim.log.levels.ERROR)
|
||||||
-- -- Get the file extension
|
end
|
||||||
-- local file_extension = vim.fn.expand("%:e")
|
end, opts)
|
||||||
--
|
|
||||||
-- -- Check if the file extension is allowed
|
|
||||||
-- if string.find(allowed_extensions, file_extension) then
|
|
||||||
-- vim.cmd("so %")
|
|
||||||
-- vim.notify("Sourced file", vim.log.levels.INFO)
|
|
||||||
-- else
|
|
||||||
-- vim.notify("Filetype not supported", vim.log.levels.ERROR)
|
|
||||||
-- end
|
|
||||||
-- end, opts)
|
|
||||||
|
|
||||||
-- Optimize Window Resize
|
-- Optimize Window Resize
|
||||||
|
|
||||||
|
|||||||
@@ -7,40 +7,26 @@ function CheckPoetryVirtualEnv()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function ResolvePythonEnvironment()
|
function ResolvePythonEnvironment()
|
||||||
-- Check if asdf is installed
|
|
||||||
|
|
||||||
-- Get system global python env
|
-- Get system global python env
|
||||||
local python = vim.fn.system("which python3")
|
local python = vim.fn.system("which python3")
|
||||||
-- Check of virtual environments exists
|
-- Check of virtual environments exists
|
||||||
local virtual = os.getenv("VIRTUAL_ENV") or CheckPoetryVirtualEnv()
|
local virtual = os.getenv("VIRTUAL_ENV") or os.getenv("CONDA_PREFIX") or CheckPoetryVirtualEnv()
|
||||||
|
|
||||||
if virtual == nil then
|
if virtual == nil then
|
||||||
|
-- Check if poetry environment exists
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"--python-executable",
|
"--python-executable", python
|
||||||
python,
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"--python-executable",
|
"--python-executable", virtual .. "/bin/python"
|
||||||
virtual .. "/bin/python",
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
function ResolvePythonEnvironmentAsString()
|
|
||||||
local env = ResolvePythonEnvironment()
|
|
||||||
if env == nil then
|
|
||||||
return ""
|
|
||||||
end
|
|
||||||
|
|
||||||
local path = table.concat(env, " ")
|
|
||||||
|
|
||||||
return path
|
|
||||||
end
|
|
||||||
|
|
||||||
M = {}
|
M = {}
|
||||||
|
|
||||||
M.ResolvePythonEnvironmentAsString = ResolvePythonEnvironmentAsString
|
|
||||||
M.ResolvePythonEnvironment = ResolvePythonEnvironment
|
M.ResolvePythonEnvironment = ResolvePythonEnvironment
|
||||||
M.CheckPoetryVirtualEnv = CheckPoetryVirtualEnv
|
M.CheckPoetryVirtualEnv = CheckPoetryVirtualEnv
|
||||||
|
|
||||||
|
|||||||
@@ -1,67 +0,0 @@
|
|||||||
M = {}
|
|
||||||
local function trim(s)
|
|
||||||
return s:gsub("^%s*(.-)%s*$", "%1")
|
|
||||||
end
|
|
||||||
|
|
||||||
local ResolveTypescriptServer = function()
|
|
||||||
-- Find the package.json file
|
|
||||||
local viable = vim.fn.system("find . -name 'package.json' -maxdepth 3 | xargs dirname")
|
|
||||||
viable = trim(viable)
|
|
||||||
|
|
||||||
if viable == "" then
|
|
||||||
return nil
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Check for lock files
|
|
||||||
local find_npm_result = trim(vim.fn.system("find . -name 'package-lock.json' -maxdepth 3 | wc -l"))
|
|
||||||
local find_pnpm_result = trim(vim.fn.system("find . -name 'pnpm-lock.yaml' -maxdepth 3 | wc -l"))
|
|
||||||
local find_yarn_result = trim(vim.fn.system("find . -name 'yarn.lock' -maxdepth 3 | wc -l"))
|
|
||||||
|
|
||||||
local is_npm = find_npm_result == "1"
|
|
||||||
local is_pnpm = find_pnpm_result == "1"
|
|
||||||
local is_yarn = find_yarn_result == "1"
|
|
||||||
|
|
||||||
-- if no package lock files are found, end early
|
|
||||||
if not is_npm and not is_pnpm and not is_yarn then
|
|
||||||
return nil
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Determine the preferred package manager
|
|
||||||
local ppm = "pnpm" -- Default to pnpm
|
|
||||||
if is_npm then
|
|
||||||
ppm = "npm"
|
|
||||||
end
|
|
||||||
if is_yarn then
|
|
||||||
ppm = "yarn"
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Resolve TypeScript server path
|
|
||||||
local base_command = ppm .. " list typescript --dir " .. viable .. " --json"
|
|
||||||
local base_result = trim(vim.fn.system(base_command))
|
|
||||||
|
|
||||||
if base_result == "" then
|
|
||||||
vim.notify("Failed to run " .. base_command, vim.log.levels.ERROR)
|
|
||||||
return nil
|
|
||||||
end
|
|
||||||
|
|
||||||
local typescript_path = nil
|
|
||||||
|
|
||||||
if ppm == "pnpm" or ppm == "npm" or ppm == "yarn" then
|
|
||||||
local ok, parsed = pcall(vim.fn.json_decode, base_result)
|
|
||||||
if ok and parsed and #parsed > 0 and parsed[1].path then
|
|
||||||
typescript_path = parsed[1].path .. "/node_modules/typescript/lib"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if not typescript_path or typescript_path == "" then
|
|
||||||
vim.notify("TypeScript not found. Please install TypeScript globally or in the project.", vim.log.levels.ERROR)
|
|
||||||
return nil
|
|
||||||
end
|
|
||||||
|
|
||||||
return typescript_path
|
|
||||||
end
|
|
||||||
|
|
||||||
M.ResolveTypescriptServer = ResolveTypescriptServer
|
|
||||||
M.trim = trim
|
|
||||||
|
|
||||||
return M
|
|
||||||
@@ -1,127 +0,0 @@
|
|||||||
-- Sourced from github
|
|
||||||
-- https://github.com/3rd/image.nvim/issues/183#issuecomment-2572606511
|
|
||||||
|
|
||||||
M = {}
|
|
||||||
|
|
||||||
local supported_images = { "svg", "png", "jpg", "jpeg", "gif", "webp", "avif" }
|
|
||||||
local from_entry = require("telescope.from_entry")
|
|
||||||
local Path = require("plenary.path")
|
|
||||||
local conf = require("telescope.config").values
|
|
||||||
local Previewers = require("telescope.previewers")
|
|
||||||
|
|
||||||
local previewers = require("telescope.previewers")
|
|
||||||
local image_api = require("image")
|
|
||||||
|
|
||||||
local is_image_preview = false
|
|
||||||
local image = nil
|
|
||||||
local last_file_path = ""
|
|
||||||
|
|
||||||
local is_supported_image = function(filepath)
|
|
||||||
local split_path = vim.split(filepath:lower(), ".", { plain = true })
|
|
||||||
local extension = split_path[#split_path]
|
|
||||||
return vim.tbl_contains(supported_images, extension)
|
|
||||||
end
|
|
||||||
|
|
||||||
local delete_image = function()
|
|
||||||
if not image then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
image:clear()
|
|
||||||
|
|
||||||
is_image_preview = false
|
|
||||||
end
|
|
||||||
|
|
||||||
local create_image = function(filepath, winid, bufnr)
|
|
||||||
image = image_api.hijack_buffer(filepath, winid, bufnr)
|
|
||||||
|
|
||||||
if not image then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.schedule(function()
|
|
||||||
image:render()
|
|
||||||
end)
|
|
||||||
|
|
||||||
is_image_preview = true
|
|
||||||
end
|
|
||||||
|
|
||||||
local function defaulter(f, default_opts)
|
|
||||||
default_opts = default_opts or {}
|
|
||||||
return {
|
|
||||||
new = function(opts)
|
|
||||||
if conf.preview == false and not opts.preview then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
opts.preview = type(opts.preview) ~= "table" and {} or opts.preview
|
|
||||||
if type(conf.preview) == "table" then
|
|
||||||
for k, v in pairs(conf.preview) do
|
|
||||||
opts.preview[k] = vim.F.if_nil(opts.preview[k], v)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return f(opts)
|
|
||||||
end,
|
|
||||||
__call = function()
|
|
||||||
local ok, err = pcall(f(default_opts))
|
|
||||||
if not ok then
|
|
||||||
error(debug.traceback(err))
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
-- NOTE: Add teardown to cat previewer to clear image when close Telescope
|
|
||||||
local file_previewer = defaulter(function(opts)
|
|
||||||
opts = opts or {}
|
|
||||||
local cwd = opts.cwd or vim.fn.getcwd()
|
|
||||||
return Previewers.new_buffer_previewer({
|
|
||||||
title = "File Preview",
|
|
||||||
dyn_title = function(_, entry)
|
|
||||||
return Path:new(from_entry.path(entry, true)):normalize(cwd)
|
|
||||||
end,
|
|
||||||
|
|
||||||
get_buffer_by_name = function(_, entry)
|
|
||||||
return from_entry.path(entry, true)
|
|
||||||
end,
|
|
||||||
|
|
||||||
define_preview = function(self, entry, _)
|
|
||||||
local p = from_entry.path(entry, true)
|
|
||||||
if p == nil or p == "" then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
conf.buffer_previewer_maker(p, self.state.bufnr, {
|
|
||||||
bufname = self.state.bufname,
|
|
||||||
winid = self.state.winid,
|
|
||||||
preview = opts.preview,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
|
|
||||||
teardown = function(_)
|
|
||||||
if is_image_preview then
|
|
||||||
delete_image()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end, {})
|
|
||||||
|
|
||||||
local buffer_previewer_maker = function(filepath, bufnr, opts)
|
|
||||||
-- NOTE: Clear image when preview other file
|
|
||||||
if is_image_preview and last_file_path ~= filepath then
|
|
||||||
delete_image()
|
|
||||||
end
|
|
||||||
|
|
||||||
last_file_path = filepath
|
|
||||||
|
|
||||||
if is_supported_image(filepath) then
|
|
||||||
filepath = string.gsub(filepath, " ", "%%20"):gsub("\\", "")
|
|
||||||
create_image(filepath, opts.winid, bufnr)
|
|
||||||
else
|
|
||||||
previewers.buffer_previewer_maker(filepath, bufnr, opts)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
M.buffer_previewer_maker = buffer_previewer_maker
|
|
||||||
M.file_previewer = file_previewer.new
|
|
||||||
|
|
||||||
return M
|
|
||||||
@@ -1 +1 @@
|
|||||||
vim.cmd("colorscheme catppuccin-macchiato")
|
vim.cmd("colorscheme catppuccin")
|
||||||
Reference in New Issue
Block a user