Compare commits

..

14 Commits

Author SHA1 Message Date
David Ibia 13ddbe2f56 feat: added llm tools 2025-07-21 17:03:25 +01:00
David Ibia f0093997bf docs(README.md): add initial content for Absolute VIM Configuration README file 2025-07-21 17:01:49 +01:00
David Ibia 32d652a93f feat(lua): add configuration files for catppuccino theme, cheatsheet, comment, conform, dap, flutter-tools, gitignore, gitsigns, highlight-colors, image, incline, and indent-blank-line plugins.
feat(lsp-config.lua): Add configurations for various language servers and setup custom key mappings and settings for improved development experience.

feat(lualine.lua, mason.lua, mini-diff.lua, mini.lua, notify.lua, nvim-bqf.lua, nvim-cmp.lua, nvim-silicon.lua, nvim-surround.lua): Add new Lua files and configurations for lualine theme, mason setup, mini-diff, mini map integrations, notify setup, nvim-bqf, nvim-cmp autocompletion, nvim-silicon screenshot, and nvim-surround setup.

feat(nvim-tree.lua): add custom configurations for Nvim Tree plugin
feat(nvim-treesitter-context.lua): implement Treesitter Context plugin setup
feat(nvim-treesitter.lua): configure Nvim Treesitter with specific parsers and features
feat(poet-v.lua): set up Poet-V plugin with custom settings
feat(smear-cursor.lua): integrate Smear Cursor plugin with defined options
feat(tailwind-sorter.lua): initialize Tailwind Sorter plugin with save patterns and settings

feat(telescope.lua): add custom settings and extensions to improve Telescope functionality

feat(venv-selector.lua): add venv-selector setup and key mappings for VenvSelector and VenvSelectCached to enhance venv management.
2025-07-21 17:01:26 +01:00
David Ibia e9d9d2ac3b feat(init.lua): add new file init.lua with require statement for absolute module 2025-07-21 17:00:24 +01:00
David Ibia ddb1a63b2a chore: add initial configuration files for gitignore, rgignore, and tool-versions 2025-07-21 17:00:15 +01:00
David Ibia e641c42858 feat(theme): add new Lua script to set the color scheme to catppuccin-macchiato 2025-07-21 16:59:49 +01:00
David Ibia a55fa95d04 feat(colorscheme.lua): add functions to set window preferences and sync themes for WezTerm and Ghostty terminals. 2025-07-21 16:59:38 +01:00
David Ibia a12b3bb04e feat(lua): add helper functions to open project folder based on OS for better navigation 2025-07-21 16:59:25 +01:00
David Ibia 71e165541c feat(lua): add absolute Lua module with core, lazy, helpers, and remap submodules 2025-07-21 16:59:14 +01:00
David Ibia 95e0c9d74c feat(remap.lua): add key mappings for various actions to improve productivity and navigation in Vim 2025-07-21 16:59:07 +01:00
David Ibia f42b8759c5 feat(lazy.lua): add lazy loading functionality for lazy.nvim plugin to improve startup time and performance 2025-07-21 16:58:58 +01:00
David Ibia bdc798ba64 feat(lsp): add pbkit.lua file for Protocol Buffers Language Server Protocol integration 2025-07-21 16:58:50 +01:00
David Ibia 41c18ff80c feat(plugins): add multiple new Lua plugins for various functionalities
feat(plugins): add various new Lua plugins for Neovim configuration.

feat(plugins): add venv-selector, vim-maximizer, and vim-tmux-navigator plugins to enhance functionality
2025-07-21 16:58:32 +01:00
David Ibia 107d3c5db2 feat(lua): add utility functions to detect Lua, OS, Python environment, TypeScript environment, Git root, and safe function invocation. 2025-07-21 16:53:44 +01:00
69 changed files with 1656 additions and 1015 deletions
+3
View File
@@ -0,0 +1,3 @@
.git
!.env
!.opencommit
+2
View File
@@ -0,0 +1,2 @@
python 3.11.0
nodejs 20.0.0
+3 -46
View File
@@ -2,9 +2,8 @@
## Introduction ## Introduction
Here's the VIM configuration I'm going to be using for most of my professional work this year. 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.
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
@@ -35,47 +34,5 @@ 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
- [Tokyonight](https://github.com/folke/tokyonight.nvim) Work in progress...
### 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 |
|------------|-------------|
+71 -62
View File
@@ -1,69 +1,78 @@
{ {
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"LuaSnip": { "branch": "master", "commit": "e808bee352d1a6fcf902ca1a71cee76e60e24071" }, "LuaSnip": { "branch": "master", "commit": "831a130291eb6dae0dabd2748d0a99401a2eebc4" },
"catppuccin": { "branch": "main", "commit": "63685e1562ef53873c9764b483d7ac5c7a608922" }, "catppuccin": { "branch": "main", "commit": "fa42eb5e26819ef58884257d5ae95dd0552b9a66" },
"cheatsheet.nvim": { "branch": "master", "commit": "9716f9aaa94dd1fd6ce59b5aae0e5f25e2a463ef" }, "cheatsheet.nvim": { "branch": "master", "commit": "9716f9aaa94dd1fd6ce59b5aae0e5f25e2a463ef" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, "cmp-cmdline": { "branch": "main", "commit": "d126061b624e0af6c3a556428712dd4d4194ec6d" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp-path": { "branch": "main", "commit": "e52e640b7befd8113b3350f46e8cfcfe98fcf730" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"conform.nvim": { "branch": "master", "commit": "1a99fdc1d3aa9ccdf3021e67982a679a8c5c740c" }, "codecompanion.nvim": { "branch": "main", "commit": "99448f47c3e23a06009ac176ba4c785e162d9c10" },
"copilot.vim": { "branch": "release", "commit": "782461159655b259cff10ecff05efa761e3d4764" }, "conform.nvim": { "branch": "master", "commit": "973f3cb73887d510321653044791d7937c7ec0fa" },
"dashboard-nvim": { "branch": "master", "commit": "fabf5feec96185817c732d47d363f34034212685" }, "copilot.vim": { "branch": "release", "commit": "12995dffe10282b29b8335650bf3e7457f4870e7" },
"dressing.nvim": { "branch": "master", "commit": "1b7921eecc65af1baf8ac1dc06f0794934cbcfb2" }, "dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
"flutter-tools.nvim": { "branch": "main", "commit": "ea1d398f543a54ba95357c3b8bb9d6f68eaec36c" }, "flutter-tools.nvim": { "branch": "main", "commit": "70430c32d176f4a15c6e2c80586cd2791e3a664e" },
"friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" }, "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
"fzf": { "branch": "master", "commit": "855f90727af7827d9934b7fa00ea5ed51f5e4e81" }, "fzf": { "branch": "master", "commit": "ead302981cc9d9219e58c1517921e9f2d68a6b6e" },
"git-blame.nvim": { "branch": "master", "commit": "8c56e864d448e84e0162872c381dd2715824dce2" }, "gen.nvim": { "branch": "main", "commit": "e09a8dbffa139ad60d5b47998fcc8669ead1ebf4" },
"gitignore.nvim": { "branch": "master", "commit": "2455191ec94da8ed222806a4fe3aa358eac1e558" }, "git-blame.nvim": { "branch": "master", "commit": "8503b199edf9a666fe7b1a989cf14e3c26b2eb03" },
"gitsigns.nvim": { "branch": "main", "commit": "1ef74b546732f185d0f806860fa5404df7614f28" }, "gitignore.nvim": { "branch": "master", "commit": "0344f643768c4d64af4add8c1bdddf6f7d4c9010" },
"harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" }, "gitsigns.nvim": { "branch": "main", "commit": "0cb5a7753d3c4b8e9cfdc9d88d9110cb8d4b1544" },
"incline.nvim": { "branch": "main", "commit": "16fc9c073e3ea4175b66ad94375df6d73fc114c0" }, "image.nvim": { "branch": "master", "commit": "4c51d6202628b3b51e368152c053c3fb5c5f76f2" },
"indent-blankline.nvim": { "branch": "master", "commit": "18603eb949eba08300799f64027af11ef922283f" }, "incline.nvim": { "branch": "main", "commit": "0fd2d5a27504dba7fdc507a53275f22c081fe640" },
"keyseer.nvim": { "branch": "main", "commit": "6cb478f9b2be4af4680ceb0308a9b49cd6b6ea73" }, "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
"lazy.nvim": { "branch": "main", "commit": "460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"lspkind.nvim": { "branch": "master", "commit": "cff4ae321a91ee3473a92ea1a8c637e3a9510aec" }, "llm.nvim": { "branch": "main", "commit": "9832a149bdcf0709433ca9c2c3a1c87460e98d13" },
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" }, "lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" }, "lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" },
"mason-nvim-dap.nvim": { "branch": "main", "commit": "8b9363d83b5d779813cdd2819b8308651cec2a09" }, "markview.nvim": { "branch": "main", "commit": "ec33f2aa333ca1d76f51847922578434d7aeadf7" },
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "bb3a17efc797c34c054463174e5522442576ebd8" },
"mini.nvim": { "branch": "main", "commit": "19e1584124cda35388d4fdb911eab7124014e541" }, "mason-registry": { "branch": "main", "commit": "467ac84d138997773be67e2e5bd4020cb96a3697" },
"nightfly": { "branch": "master", "commit": "19efaf31cbe15a429cb3ca6ac9c9fce13275045b" }, "mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
"noice.nvim": { "branch": "main", "commit": "c1ba80ccf6b3bd8c7fc88fe2e61085131d44ad65" }, "mcphub.nvim": { "branch": "main", "commit": "0d53a53f327b61c45691d6a60a16c20baf4590ea" },
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, "mini.diff": { "branch": "main", "commit": "63a7ce537ced356b8180892d9586826b0afb519c" },
"nvim-bqf": { "branch": "main", "commit": "1b24dc6050c34e8cd377b6b4cd6abe40509e0187" }, "mini.nvim": { "branch": "main", "commit": "0420076298c4457f200c2de468f65d080597a347" },
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, "nightfly": { "branch": "master", "commit": "8c55003e89f321a48a8cd4bb426dd3e7c58f0646" },
"nvim-dap": { "branch": "master", "commit": "90616ae6ae40053103dc66872886fc26b94c70c8" }, "nvim-bqf": { "branch": "main", "commit": "dd17c73912487dccb372deff85d4262d2b89bc2b" },
"nvim-dap-python": { "branch": "master", "commit": "db72bf6ab9f75fe841e8e11e772ee7fef6f484f1" }, "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
"nvim-dap-ui": { "branch": "master", "commit": "1c351e4e417d4691da12948b6ecf966936a56d28" }, "nvim-dap": { "branch": "master", "commit": "5dd4d50f2e6a2eaf9e57fad023d294ef371bda35" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "3497eb39bf413a57ab5b7e7e2e192683e462148c" }, "nvim-dap-python": { "branch": "master", "commit": "261ce649d05bc455a29f9636dc03f8cdaa7e0e2c" },
"nvim-highlight-colors": { "branch": "main", "commit": "a411550ef85cae467b889ba7d1a96bd78332d90e" }, "nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
"nvim-lsp-file-operations": { "branch": "master", "commit": "92a673de7ecaa157dd230d0128def10beb56d103" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
"nvim-lspconfig": { "branch": "master", "commit": "aaec5d049af99e7b975bdf68aca582f1aa91b338" }, "nvim-highlight-colors": { "branch": "main", "commit": "b42a5ccec7457b44e89f7ed3b3afb1b375bb2093" },
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, "nvim-lsp-file-operations": { "branch": "master", "commit": "9744b738183a5adca0f916527922078a965515ed" },
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, "nvim-lspconfig": { "branch": "master", "commit": "f47cd681d7cb6048876a2e908b6d8ba1e530d152" },
"nvim-silicon": { "branch": "main", "commit": "9fe6001dc8cad4d9c53bcfc8649e3dc76ffa169c" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
"nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" }, "nvim-notify": { "branch": "master", "commit": "a22f5d7ac511c2df2fd3290a9f04c48d5a822e2e" },
"nvim-treesitter": { "branch": "master", "commit": "2b2ac302324f4cd2194c5dcaa59332b65e1c6403" }, "nvim-silicon": { "branch": "main", "commit": "7f66bda8f60c97a5bf4b37e5b8acb0e829ae3c32" },
"nvim-treesitter-context": { "branch": "master", "commit": "7f7eeaa99e5a9beab518f502292871ae5f20de6f" }, "nvim-surround": { "branch": "main", "commit": "ae298105122c87bbe0a36b1ad20b06d417c0433e" },
"nvim-web-devicons": { "branch": "master", "commit": "9154484705968658e9aab2b894d1b2a64bf9f83d" }, "nvim-tmux-navigation": { "branch": "main", "commit": "4898c98702954439233fdaf764c39636681e2861" },
"nvim_lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"pkl-neovim": { "branch": "main", "commit": "a0ae099c7eb926150ee0a126b1dd78086edbe3fc" }, "nvim-treesitter-context": { "branch": "master", "commit": "59f318a65d42a5c4037796886a8874fd57f774fc" },
"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": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
"poet-v": { "branch": "master", "commit": "85a5dd44d89602cc3dccd2489924e9c7caab0044" }, "poet-v": { "branch": "master", "commit": "85a5dd44d89602cc3dccd2489924e9c7caab0044" },
"rose-pine": { "branch": "main", "commit": "8b1fd252255a7f2c41b4192a787ab62660b29f72" }, "popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
"tailwind-sorter.nvim": { "branch": "main", "commit": "e03eea3909c28509375993fb77a42454ac8ecbb2" }, "render-markdown.nvim": { "branch": "main", "commit": "7620d4e96eb5cf8d12e76c6fcaf1267628564ba9" },
"telescope-dap.nvim": { "branch": "master", "commit": "8c88d9716c91eaef1cdea13cb9390d8ef447dbfe" }, "rose-pine": { "branch": "main", "commit": "72befaffeac38db7bdd49e0549eaa2c4806dd878" },
"telescope-file-browser.nvim": { "branch": "master", "commit": "dd9de68c08b6d678198a99f5ea13e0384a1f04cf" }, "smear-cursor.nvim": { "branch": "main", "commit": "4a0f7ac265b4ed1ce4d0af2afc13072763bfa691" },
"telescope-themes": { "branch": "main", "commit": "f005622f066cc0cdbaf9bb44c48edbec67985501" }, "tailwind-sorter.nvim": { "branch": "main", "commit": "717e5c9761ed8334dadbb9357df7d826aae97b92" },
"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": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
"toggleterm.nvim": { "branch": "main", "commit": "48be57eaba817f038d61bbf64d2c597f578c0827" }, "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
"tokyonight": { "branch": "main", "commit": "817bb6ffff1b9ce72cdd45d9fcfa8c9cd1ad3839" }, "tokyonight": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },
"treesj": { "branch": "main", "commit": "0d81326b5afd36babe7dd480aabbb0b05f33e688" }, "tree-sitter-ghostty": { "branch": "main", "commit": "1d5238fc0da5fd5a59130b95c3e1c4948a3f96c1" },
"trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" }, "treesj": { "branch": "main", "commit": "3b4a2bc42738a63de17e7485d4cc5e49970ddbcc" },
"undotree": { "branch": "master", "commit": "78b5241191852ffa9bb5da5ff2ee033160798c3b" }, "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
"vim-maximizer": { "branch": "master", "commit": "2e54952fe91e140a2e69f35f22131219fcd9c5f1" }, "undotree": { "branch": "master", "commit": "28f2f54a34baff90ea6f4a735ef1813ad875c743" },
"vim-tmux-navigator": { "branch": "master", "commit": "a9b52e7d36114d40350099f254b5f299a35df978" } "venv-selector.nvim": { "branch": "regexp", "commit": "c677caa1030808a9f90092e522de7cc20c1390dd" },
"vim-maximizer": { "branch": "master", "commit": "2e54952fe91e140a2e69f35f22131219fcd9c5f1" }
} }
+6
View File
@@ -1,3 +1,9 @@
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
+40
View File
@@ -0,0 +1,40 @@
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)
+22 -3
View File
@@ -1,14 +1,33 @@
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 = { "isort", "black" }, python = {
-- 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" } }, astro = { "prettierd", "prettier", "biome" },
vue = { "prettierd", "prettier" },
proto = { "buf" },
yaml = { "prettierd", "prettier" },
}, },
}) })
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()" -- vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
-11
View File
@@ -1,6 +1,5 @@
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
@@ -11,12 +10,7 @@ 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()
@@ -35,8 +29,3 @@ 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)
-25
View File
@@ -1,25 +0,0 @@
local dashboard = require("dashboard")
local header = {
[[' ⣇⣿⠘⣿⣿⣿⡿⡿⣟⣟⢟⢟⢝⠵⡝⣿⡿⢂⣼⣿⣷⣌⠩⡫⡻⣝⠹⢿⣿⣷ ']],
[[' ⡆⣿⣆⠱⣝⡵⣝⢅⠙⣿⢕⢕⢕⢕⢝⣥⢒⠅⣿⣿⣿⡿⣳⣌⠪⡪⣡⢑⢝⣇ ']],
[[' ⡆⣿⣿⣦⠹⣳⣳⣕⢅⠈⢗⢕⢕⢕⢕⢕⢈⢆⠟⠋⠉⠁⠉⠉⠁⠈⠼⢐⢕⢽ ']],
[[' ⡗⢰⣶⣶⣦⣝⢝⢕⢕⠅⡆⢕⢕⢕⢕⢕⣴⠏⣠⡶⠛⡉⡉⡛⢶⣦⡀⠐⣕⢕ ']],
[[' ⡝⡄⢻⢟⣿⣿⣷⣕⣕⣅⣿⣔⣕⣵⣵⣿⣿⢠⣿⢠⣮⡈⣌⠨⠅⠹⣷⡀⢱⢕ ']],
[[' ⡝⡵⠟⠈⢀⣀⣀⡀⠉⢿⣿⣿⣿⣿⣿⣿⣿⣼⣿⢈⡋⠴⢿⡟⣡⡇⣿⡇⡀⢕ ']],
[[' ⡝⠁⣠⣾⠟⡉⡉⡉⠻⣦⣻⣿⣿⣿⣿⣿⣿⣿⣿⣧⠸⣿⣦⣥⣿⡇⡿⣰⢗⢄ ']],
[[' ⠁⢰⣿⡏⣴⣌⠈⣌⠡⠈⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣬⣉⣉⣁⣄⢖⢕⢕⢕ ']],
[[' ⡀⢻⣿⡇⢙⠁⠴⢿⡟⣡⡆⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣵⣵⣿ ']],
[[' ⡻⣄⣻⣿⣌⠘⢿⣷⣥⣿⠇⣿⣿⣿⣿⣿⣿⠛⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ']],
[[' ⣷⢄⠻⣿⣟⠿⠦⠍⠉⣡⣾⣿⣿⣿⣿⣿⣿⢸⣿⣦⠙⣿⣿⣿⣿⣿⣿⣿⣿⠟ ']],
[[' ⡕⡑⣑⣈⣻⢗⢟⢞⢝⣻⣿⣿⣿⣿⣿⣿⣿⠸⣿⠿⠃⣿⣿⣿⣿⣿⣿⡿⠁⣠ ']],
[[' ⡝⡵⡈⢟⢕⢕⢕⢕⣵⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣶⣿⣿⣿⣿⣿⠿⠋⣀⣈⠙ ']],
[[' ⡝⡵⡕⡀⠑⠳⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⡠⡲⡫⡪⡪⡣ ']],
}
dashboard.setup({
theme = "hyper",
config = {
header = header,
},
})
+36
View File
@@ -0,0 +1,36 @@
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.
})
-10
View File
@@ -1,10 +0,0 @@
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)
+37
View File
@@ -0,0 +1,37 @@
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
})
-3
View File
@@ -1,3 +0,0 @@
local keyseer = require("keyseer")
keyseer.setup({})
+105
View File
@@ -0,0 +1,105 @@
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",
})
+89 -40
View File
@@ -1,10 +1,13 @@
-- 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
@@ -45,12 +48,24 @@ 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", "<leader>f", function() vim.keymap.set({ "n", "v" }, "<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()
@@ -78,6 +93,16 @@ 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
@@ -90,6 +115,7 @@ 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
@@ -117,6 +143,7 @@ lspconfig["emmet_ls"].setup({
"html", "html",
"typescriptreact", "typescriptreact",
"javascriptreact", "javascriptreact",
"astro",
"css", "css",
"sass", "sass",
"scss", "scss",
@@ -126,41 +153,28 @@ lspconfig["emmet_ls"].setup({
}, },
}) })
-- configure ruff server
-- configure python lsp lspconfig["ruff"].setup({
lspconfig["pylsp"].setup({
filetypes = { "python" },
capabilities = capabilities, capabilities = capabilities,
on_attach = on_attach, on_attach = on_attach,
pylsp = { })
pylsp = {
plugins = { -- configure pyright server
rope_autoimport = { lspconfig["pyright"].setup({
enabled = true, capabilities = capabilities,
completions = { enabled = true }, on_attach = on_attach,
rename = { enabled = false }, filetypes = { "python" },
}, settings = {
black = { enabled = true }, python = {
autopep8 = { enabled = false }, analysis = {
yapf = { enabled = false }, autoSearchPaths = true,
flake8 = { enabled = true }, useLibraryCodeForTypes = true,
jedi_completion = { diagnosticMode = "workspace",
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,
@@ -178,6 +192,33 @@ 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
@@ -217,12 +258,6 @@ 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,
@@ -245,6 +280,11 @@ 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
@@ -253,12 +293,21 @@ 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
-26
View File
@@ -1,6 +1,5 @@
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",
@@ -46,21 +45,6 @@ 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
@@ -95,16 +79,6 @@ 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,
+4 -10
View File
@@ -8,19 +8,13 @@ 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_installation = true, automatic_enable = false,
})
require("mason-nvim-dap").setup({
ensure_installed = {
"debugpy", -- python
},
automatic_installation = true,
}) })
+6
View File
@@ -0,0 +1,6 @@
local diff = require("mini.diff")
diff.setup({
-- Disabled by default
source = diff.gen_source.none(),
})
-92
View File
@@ -1,92 +0,0 @@
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" },
},
},
},
})
-9
View File
@@ -1,9 +0,0 @@
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,
},
})
+25
View File
@@ -0,0 +1,25 @@
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
+30 -9
View File
@@ -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", completeopt = "menu,menuone,preview,noinsert,noselect",
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,17 +29,19 @@ cmp.setup({
end, end,
}, },
mapping = cmp.mapping.preset.insert({ mapping = cmp.mapping.preset.insert({
["<C-o>"] = cmp.mapping.complete(), -- show completion suggestions ["<C-.>"] = cmp.mapping.complete(), -- show completion suggestions
["<C-e>"] = cmp.mapping.abort(), -- close completion menu ["C-<BS>"] = 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 = {
@@ -49,3 +51,22 @@ 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 = 0, -- How many lines the window should span. Values <= 0 mean no limit. max_lines = 5, -- 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
+2
View File
@@ -5,6 +5,7 @@ require("nvim-treesitter.configs").setup({
"javascript", "javascript",
"typescript", "typescript",
"python", "python",
"proto",
"c", "c",
"lua", "lua",
"vim", "vim",
@@ -30,6 +31,7 @@ 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 = {
+15 -17
View File
@@ -1,22 +1,20 @@
vim.g.poetv_executables = { "poetry", "pipenv" } vim.g.poetv_executables = { "poetry" }
vim.g.poetv_auto_activate = 1 vim.g.poetv_auto_activate = 0
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" }, callback = function() vim.cmd([[ PoetvActivate]]) end }) pattern = { "*/.venv/*", "*.py" },
callback = function()
-- check if poetv is activated
if vim.g.poetv_name ~= nil then
return
else
vim.cmd([[ PoetvActivate ]])
vim.cmd([[ LspRestart ]])
end
end,
})
+10
View File
@@ -0,0 +1,10 @@
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",
})
+117 -11
View File
@@ -2,10 +2,40 @@ 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",
@@ -14,6 +44,9 @@ telescope.setup({
"--line-number", "--line-number",
"--column", "--column",
"--smart-case", "--smart-case",
"--follow",
"--hidden",
"--glob=!.git/",
}, },
mappings = { mappings = {
i = { i = {
@@ -27,25 +60,77 @@ 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 = false, respect_gitignore = vim.fn.executable("fd") == 1,
auto_depth = true, hidden = { file_browser = true, folder_browser = false },
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("flutter") telescope.load_extension("media_files")
telescope.load_extension("dap")
telescope.load_extension("themes") telescope.load_extension("themes")
telescope.load_extension("dap")
local find_files = function() local find_files = function()
builtin.find_files({ builtin.find_files({
@@ -53,24 +138,45 @@ 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>af", "<cmd>Telescope file_browser<CR>", opts) vim.keymap.set("n", "<leader>pf", "<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", "<leader>pf", find_files, opts) vim.keymap.set("n", "<C-p>", 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", "<C-p>", builtin.git_files, opts) vim.keymap.set("n", "<leader>gf", builtin.git_files, opts)
opts.desc = "Fuzzy find string under cursor in cwd" opts.desc = "Fuzzy find files in cwd"
vim.keymap.set("n", "<leader>ps", function() vim.keymap.set("n", "<leader>ps", default_grep_files, opts)
builtin.grep_string({ search = vim.fn.input("Grep > ") })
end, opts) opts.desc = "Fuzzy find word under cursor in cwd"
vim.keymap.set("n", "<leader>sb", live_grep_shortcuts.grep_word_under_cursor, opts)
+26
View File
@@ -29,8 +29,34 @@ 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)
+14
View File
@@ -0,0 +1,14 @@
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)
+101 -9
View File
@@ -7,19 +7,20 @@ 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", 50) local normal_blend = get_blend_value("Normal", 0)
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", 50) local normal_float_blend = get_blend_value("NormalFloat", 0)
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", 50) local normal_nc_blend = get_blend_value("NormalNC", 0)
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 colorschemes = { local function SyncWezTerm()
local colorschemes = {
["tokyonight-day"] = "Tokyo Night Day", ["tokyonight-day"] = "Tokyo Night Day",
["tokyonight-night"] = "Tokyo Night Night", ["tokyonight-night"] = "Tokyo Night Night",
["tokyonight-storm"] = "Tokyo Night Storm", ["tokyonight-storm"] = "Tokyo Night Storm",
@@ -28,9 +29,8 @@ local colorschemes = {
["catppuccin-latte"] = "Catppuccin Latte", ["catppuccin-latte"] = "Catppuccin Latte",
["catppuccin-macchiato"] = "Catppuccin Macchiato", ["catppuccin-macchiato"] = "Catppuccin Macchiato",
["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,11 +41,19 @@ local function SyncWezTerm()
return return
end end
-- Write the colorscheme to a file -- if the file does not exists, exit early
local filename = vim.fn.expand("$XDG_CONFIG_HOME/wezterm/colorscheme") 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
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)
@@ -53,9 +61,93 @@ local function SyncWezTerm()
}) })
end end
-- Setup Autocommand if wezterm is available in the system local function SyncGhostyTerm()
if vim.fn.executable("wezterm") == 1 then 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
if is_wezterm() then
SyncWezTerm() SyncWezTerm()
end
-- Setup Autommand if the terminal is Ghostty
if is_ghostty() then
SyncGhostyTerm()
end
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)
+4 -1
View File
@@ -2,11 +2,14 @@ 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
+4 -2
View File
@@ -1,6 +1,8 @@
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")
+8
View File
@@ -0,0 +1,8 @@
return {
default_config = {
cmd = { "pb", "lsp" },
filetypes = { "proto" },
single_file_support = true,
root_dir = require("lspconfig.util").root_pattern(".git"),
},
}
+1
View File
@@ -1,5 +1,6 @@
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 = {
+11
View File
@@ -0,0 +1,11 @@
return {
"olimorris/codecompanion.nvim",
dependencies = {
"ravitemer/mcphub.nvim",
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
},
config = function()
require("absolute.after.codecompanion")
end,
}
+1 -1
View File
@@ -1,3 +1,3 @@
return { return {
"github/copilot.vim" "github/copilot.vim",
} }
-6
View File
@@ -5,12 +5,6 @@ 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")
-11
View File
@@ -1,11 +0,0 @@
return {
"nvimdev/dashboard-nvim",
dependencies = {
"nvim-tree/nvim-web-devicons"
},
event = "VimEnter",
config = function()
require("absolute.after.dashboard")
end
}
+4 -3
View File
@@ -1,9 +1,10 @@
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")
+7
View File
@@ -0,0 +1,7 @@
return {
"David-Kunz/gen.nvim",
enabled = false,
config = function()
require("absolute.after.gen")
end,
}
-7
View File
@@ -1,7 +0,0 @@
return {
"theprimeagen/harpoon",
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
require("absolute.after.harpoon")
end
}
+6
View File
@@ -0,0 +1,6 @@
return {
"3rd/image.nvim",
config = function()
require("absolute.after.image")
end,
}
-7
View File
@@ -1,7 +0,0 @@
return {
"jokajak/keyseer.nvim",
version = "*",
config = function()
require("absolute.after.keyseer")
end,
}
+7
View File
@@ -0,0 +1,7 @@
return {
"huggingface/llm.nvim",
enabled = false,
config = function()
require("absolute.after.llm")
end,
}
+11
View File
@@ -0,0 +1,11 @@
return {
"OXY2DEV/markview.nvim",
lazy = false,
opts = {
preview = {
filetypes = { "markdown", "codecompanion" },
ignore_buftypes = {},
},
experimental = { check_rtp_message = false },
},
}
+5 -11
View File
@@ -1,17 +1,11 @@
return { return {
'williamboman/mason.nvim', "mason-org/mason.nvim",
dependencies = { dependencies = {
'williamboman/mason-lspconfig.nvim', "mason-org/mason-registry",
{ "mason-org/mason-lspconfig.nvim",
"jay-babu/mason-nvim-dap.nvim", "neovim/nvim-lspconfig",
dependencies = {
"mfussenegger/nvim-dap",
}
}
}, },
config = function() config = function()
require("absolute.after.mason") require("absolute.after.mason")
end end,
} }
+6
View File
@@ -0,0 +1,6 @@
return {
"echasnovski/mini.diff",
config = function()
require("absolute.after.mini-diff")
end,
}
+2 -1
View File
@@ -1,7 +1,8 @@
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,
} }
-15
View File
@@ -1,15 +0,0 @@
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,
}
@@ -1,7 +0,0 @@
return {
"nvimtools/none-ls.nvim",
config = function()
require("absolute.after.none-ls")
end
}
+8
View File
@@ -0,0 +1,8 @@
return {
"rcarriga/nvim-notify",
lazy = false,
priority = 1000,
config = function()
require("absolute.after.notify")
end,
}
+1
View File
@@ -1,5 +1,6 @@
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,4 +1,5 @@
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")
+4 -1
View File
@@ -1,7 +1,10 @@
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 -3
View File
@@ -1,9 +1,7 @@
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,
} }
+4
View File
@@ -0,0 +1,4 @@
return {
"MeanderingProgrammer/render-markdown.nvim",
ft = { "markdown", "codecompanion" }
}
+7
View File
@@ -0,0 +1,7 @@
return {
enabled = false,
"sphamba/smear-cursor.nvim",
config = function()
require("absolute.after.smear-cursor")
end,
}
+1
View File
@@ -1,4 +1,5 @@
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",
@@ -1,7 +0,0 @@
return {
"nvim-telescope/telescope-file-browser.nvim",
dependencies = {
"nvim-telescope/telescope.nvim",
"nvim-lua/plenary.nvim"
},
}
+12 -3
View File
@@ -1,12 +1,21 @@
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,
} }
@@ -0,0 +1,4 @@
return {
"bezhermoso/tree-sitter-ghostty",
build = "make nvim_install",
}
+14
View File
@@ -0,0 +1,14 @@
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
}
+15 -15
View File
@@ -1,17 +1,17 @@
return { return {
"christoomey/vim-tmux-navigator", "alexghergh/nvim-tmux-navigation",
cmd = { config = function()
"TmuxNavigateLeft", local nvim_tmux_nav = require("nvim-tmux-navigation")
"TmuxNavigateDown",
"TmuxNavigateUp", nvim_tmux_nav.setup({
"TmuxNavigateRight", disable_when_zoomed = true, -- defaults to false
"TmuxNavigatePrevious", })
},
keys = { vim.keymap.set("n", "<C-h>", nvim_tmux_nav.NvimTmuxNavigateLeft)
{ "<C-h>", "<cmd><C-U>TmuxNavigateLeft<CR>" }, vim.keymap.set("n", "<C-j>", nvim_tmux_nav.NvimTmuxNavigateDown)
{ "<C-j>", "<cmd><C-U>TmuxNavigateDown<CR>" }, vim.keymap.set("n", "<C-k>", nvim_tmux_nav.NvimTmuxNavigateUp)
{ "<C-k>", "<cmd><C-U>TmuxNavigateUp<CR>" }, vim.keymap.set("n", "<C-l>", nvim_tmux_nav.NvimTmuxNavigateRight)
{ "<C-l>", "<cmd><C-U>TmuxNavigateRight<CR>" }, vim.keymap.set("n", "<C-\\>", nvim_tmux_nav.NvimTmuxNavigateLastActive)
{ "<C-\\>", "<cmd><C-U>TmuxNavigatePrevious<CR>" }, vim.keymap.set("n", "<C-Space>", nvim_tmux_nav.NvimTmuxNavigateNext)
}, end,
} }
+29 -25
View File
@@ -1,7 +1,7 @@
local opts = { noremap = true, silent = true } local opts = {
noremap = true,
opts.desc = "Show Cheatsheet" silent = true,
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,10 +53,6 @@ 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"
@@ -76,7 +72,6 @@ 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)
@@ -84,22 +79,31 @@ 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 = [[".vim", ".lua", ".vimrc", ".gvimrc", ".nvim", ".nvimrc", ".sh"]] -- local allowed_extensions = [[
-- ".vim",
-- Get the file extension -- ".lua",
local file_extension = vim.fn.expand("%:e") -- ".vimrc",
-- ".gvimrc",
-- Check if the file extension is allowed -- ".nvim",
if string.find(allowed_extensions, file_extension) then -- ".nvimrc",
vim.cmd("so %") -- ".sh"
else -- ]]
vim.notify("Filetype not supported", vim.log.levels.ERROR) --
end -- -- Get the file extension
end, opts) -- local file_extension = vim.fn.expand("%:e")
--
-- -- 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
+19 -5
View File
@@ -7,26 +7,40 @@ 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 os.getenv("CONDA_PREFIX") or CheckPoetryVirtualEnv() local virtual = os.getenv("VIRTUAL_ENV") or CheckPoetryVirtualEnv()
if virtual == nil then if virtual == nil then
-- Check if poetry environment exists
return { return {
"--python-executable", python "--python-executable",
python,
} }
end end
return { return {
"--python-executable", virtual .. "/bin/python" "--python-executable",
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
@@ -0,0 +1,67 @@
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
@@ -0,0 +1,127 @@
-- 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
View File
@@ -1 +1 @@
vim.cmd("colorscheme catppuccin") vim.cmd("colorscheme catppuccin-macchiato")