Compare commits

..

323 Commits

Author SHA1 Message Date
Dreaded_X 21b90d8a22 Use tty pin entry for gpg 2026-04-10 05:25:42 +02:00
Dreaded_X ebef24bec5 Plugin updates 2026-04-10 05:25:41 +02:00
Dreaded_X a3698677ea Use PGP auth key for ssh 2026-04-10 05:25:40 +02:00
Dreaded_X 206db58418 Sign commits using yubikey 2026-04-08 06:27:28 +02:00
Dreaded_X 93bd0c1cb7 Enable mise plugin 2026-04-08 06:20:20 +02:00
Dreaded_X fa3ec81cf3 Add multicolumn plugin to show max line length 2026-03-13 18:10:55 +01:00
Dreaded_X 9df3d54a4b Always use Dreaded_X profile for dotfiles 2026-03-13 17:22:06 +01:00
Dreaded_X 2dad06edd8 Added gitlab review plugin 2026-03-13 17:12:35 +01:00
Dreaded_X 30bcab5f3e Add auto-complete for pnpm 2026-03-13 14:14:43 +01:00
Dreaded_X 49e7cf1816 Fix fzf list order in some instances 2026-03-13 07:18:52 +01:00
Dreaded_X 9a7378ef32 Configure tmux-fzf-url window size 2026-03-13 07:18:52 +01:00
Dreaded_X 7ed92881f1 Update nvim plugins 2026-03-13 07:18:52 +01:00
Dreaded_X 533b29e5e3 Added completions for tula 2026-03-13 07:18:52 +01:00
Dreaded_X daa73fbabc Update zsh and zsh plugins 2026-03-13 07:18:51 +01:00
Dreaded_X 19933bf58d Switch to better zsh vi mode 2026-03-13 07:18:51 +01:00
Dreaded_X d471a8436a Auto setup remote when pushing 2026-03-13 05:02:43 +01:00
Dreaded_X 294210e113 Added git aim-robotics config 2026-03-13 05:02:43 +01:00
Dreaded_X 1f0acfed01 Added another AIM yaml injection 2026-03-10 17:57:06 +01:00
Dreaded_X c6ea3d1c8c Added aim robotics yaml injection 2026-03-04 18:03:36 +01:00
Dreaded_X d3471e3dc8 Properly use uv environments 2026-03-02 15:11:16 +01:00
Dreaded_X 8f11e727db Update helper script 2026-02-24 13:35:18 +01:00
Dreaded_X 12a16cf7f4 Enable schema selection in all filetypes 2026-02-20 02:01:38 +01:00
Dreaded_X 5c7052140a Fixed schemacompanion lualine 2026-02-20 02:00:56 +01:00
Dreaded_X eae08e98c5 Update plugins 2026-02-20 01:07:41 +01:00
Dreaded_X 360e79aa8a Don't hide scratch sessions 2026-02-05 02:42:17 +01:00
Dreaded_X d84bc8062e Use prettier instead of prettierd
I keep having issues with prettierd not working and prettier works just
fine.
2025-12-05 13:48:28 +01:00
Dreaded_X 4e3d0500b9 Fixed pnpm setup 2025-12-03 21:32:20 +01:00
Dreaded_X 38f4c63336 Extra luals settings 2025-11-22 00:29:11 +01:00
Dreaded_X 434ff26226 Add eslint 2025-11-22 00:29:11 +01:00
Dreaded_X af95197cb1 Update lspconfig 2025-11-22 00:29:10 +01:00
Dreaded_X c2772d1874 Add vtsls as manual lsp 2025-11-22 00:29:10 +01:00
Dreaded_X dd22699549 Switch default branch to main 2025-11-22 00:29:10 +01:00
Dreaded_X b35b35731b zsh: Fix bat command availability check 2025-09-13 19:37:31 +02:00
Dreaded_X 881f99ef16 nvim: Use fork of which-key to fix border 2025-09-13 02:42:42 +02:00
Dreaded_X 0117cc612e zsh: Only start sesh-select if both sesh and sesh-select are available 2025-09-13 02:00:53 +02:00
Dreaded_X 1d3ae136be sesh: Moved sesh-select to be under sesh 2025-09-13 01:59:45 +02:00
Dreaded_X 362064b206 git: Also install git fixup on git-alten 2025-09-13 01:35:29 +02:00
Dreaded_X c84b6b6584 nvim: Added crate plugin 2025-09-12 02:47:17 +02:00
Dreaded_X 9108f57780 nvim: Update other plugins 2025-09-12 02:21:14 +02:00
Dreaded_X e4d4be54c6 nvim: Update schema-companion and kubernetes matcher 2025-09-12 02:21:14 +02:00
Dreaded_X 54b1090984 nvim: Switch back to fzf for fuzzy finding
Since I am now using fzf for a bunch of other things as well it made
sense to switch back in smart open as well.
2025-09-12 02:21:14 +02:00
Dreaded_X 43b0059631 nvim: Update smart-open to fix pause when opening 2025-09-12 02:21:14 +02:00
Dreaded_X 5c64115e5d tmux: Enable detach-on-destroy for scratch sessions 2025-09-12 02:21:13 +02:00
Dreaded_X af1ddc5b3f nvim: Added keybind to cargo run in shell window 2025-09-12 02:21:13 +02:00
Dreaded_X c2f57e070c tmux: Added plugin for selecting urls with the keyboard 2025-09-12 02:21:13 +02:00
Dreaded_X 374825559b tmux: Improve kill keybinds and pervent tmux from closing when there are still sessions 2025-09-12 02:21:13 +02:00
Dreaded_X d8cf7121ef sesh: Created preconfigured sessions 2025-09-12 02:21:13 +02:00
Dreaded_X 1176535475 tmux: Use sesh for tmux session management
The zsh tmux plugin has been removed and instead fzf is shown to select
a session.
2025-09-12 02:21:13 +02:00
Dreaded_X 25b3a169a2 fzf: Improve border label 2025-09-12 02:21:13 +02:00
Dreaded_X 254bfd4be2 zsh: Improve how command availability is detected 2025-09-12 02:21:13 +02:00
Dreaded_X ba282e656d nvim: Accidentally removed bufresize at some point 2025-09-12 02:21:12 +02:00
Dreaded_X e10de143eb zsh: Update Oh-My-Zsh 2025-09-08 12:32:27 +02:00
Dreaded_X e22f0c594c zsh: Added completion autosuggest strategy as fallback 2025-09-07 05:58:48 +02:00
Dreaded_X b22739cb71 zsh: Add additional completions 2025-09-07 05:37:11 +02:00
Dreaded_X a9163907be zsh: Generate text objects for quotes and brackets 2025-09-07 05:29:17 +02:00
Dreaded_X 59b2334253 readme: Added more tools 2025-09-07 05:26:23 +02:00
Dreaded_X 17a23eb7e4 zsh: Disable dirhistory plugin as I never used it 2025-09-07 05:26:20 +02:00
Dreaded_X 9a76b5071e git: Further improvements to git fixup 2025-09-07 05:26:17 +02:00
Dreaded_X 02d298a163 zsh: Configure fzf
It is now setup to look very similar to telescope.
It now uses fd for finding files.

There is a shell function `pi` to search for packages using fzf and to
then install them with paru
2025-09-07 05:26:13 +02:00
Dreaded_X 87359588e0 zsh: Added zoxide 2025-09-07 05:26:08 +02:00
Dreaded_X 98aa0593c9 Added syntax highlighting to shell 2025-09-07 04:23:04 +02:00
Dreaded_X f96eb0e234 Turn on update-refs by default 2025-09-05 04:46:20 +02:00
Dreaded_X 026e3f9fc2 Turn on autosquash and autostash 2025-09-05 04:34:50 +02:00
Dreaded_X b15b68fa5d Added useful fixup alias to make ammending old commits easier 2025-09-05 04:34:50 +02:00
Dreaded_X c906025f68 Update nvim plugins 2025-09-05 04:34:12 +02:00
Dreaded_X c1b73e5822 Added README that lists some useful tools 2025-09-05 04:34:12 +02:00
Dreaded_X a60d4a8246 Increase tmux histroy size 2025-09-04 02:34:44 +02:00
Dreaded_X d59b067075 Ros patch is now in upstream 2025-06-11 16:23:44 +02:00
Dreaded_X 4daa29ada3 Added more default installed treesitter parsers and enabled auto install 2025-06-11 14:44:32 +02:00
Dreaded_X a041084bef Use prettierd for formatting json instead of jq as it does not support fake json files properly 2025-06-11 14:37:55 +02:00
Dreaded_X 5b97d37ed3 Install new version of node on legacy ubuntu 2025-06-11 14:37:13 +02:00
Dreaded_X 35803b0b03 Added comments explaining legacy ubuntu helper scripts a bit more 2025-06-11 14:36:42 +02:00
Dreaded_X f7cc6a8c51 Fixup gitconfig inside of devcontainer 2025-06-04 11:38:53 +02:00
Dreaded_X 5d16b49967 Fixed escape delay 2025-06-04 10:39:07 +02:00
Dreaded_X f19466063a Run nvim in devcontainer through bash in order to get the correct env 2025-06-04 10:38:52 +02:00
Dreaded_X 2f1c1460a6 Added npm to legacy ubuntu nvim 2025-06-04 02:15:56 +02:00
Dreaded_X 27d2c14665 Create .config folder if it does not exist for legacy ubuntu helper 2025-06-04 02:09:45 +02:00
Dreaded_X 73d4fbbbfb Added xclip for clipboard support in legacy ubuntu nvim 2025-06-04 01:44:21 +02:00
Dreaded_X c146ff0f95 Make nvim pane switching work when inside devcontainer 2025-06-04 01:22:31 +02:00
Dreaded_X d755aa90f5 Added keybindings to quickly select tmux window 2025-06-03 23:54:26 +02:00
Dreaded_X 7be1fa7a21 Added helper script for setting up neovim in legacy ubuntu devcontainer 2025-06-03 22:08:27 +02:00
Dreaded_X 90fb7736cf Turn down basedpyright strictness 2025-06-03 21:57:55 +02:00
Dreaded_X 0458cb0825 Only enable rust_analyer if it is installed 2025-06-03 21:56:19 +02:00
Dreaded_X da7c214afe Fixed tmux stow ignore 2025-06-03 16:06:28 +02:00
Dreaded_X ffeb4d6f45 Only install goimports if go is available 2025-06-03 15:47:18 +02:00
Dreaded_X 8026ec51d9 Fixed ALTEN gitconfig 2025-06-03 15:23:01 +02:00
Dreaded_X b11e2ec42c Improved default less behavior 2025-06-03 13:44:03 +02:00
Dreaded_X 8d676a1e5e Specify neotree branch correctly 2025-06-03 13:43:59 +02:00
Dreaded_X 535ad35ded Added actions preview plugin 2025-06-03 13:43:57 +02:00
Dreaded_X b4dfc6cfc0 Use delta for git diffs 2025-06-03 13:43:54 +02:00
Dreaded_X 3e786561ab Slight git config reorganization 2025-06-03 13:43:43 +02:00
Dreaded_X c33133f7c9 Alias cat to bat if installed and use gruvbox theme 2025-06-03 02:55:16 +02:00
Dreaded_X bcce589cc1 Adjusted font size 2025-06-02 15:23:05 +02:00
Dreaded_X dccea7b3fd Disable todo comments signs 2025-06-02 03:16:20 +02:00
Dreaded_X 6ee3f0e346 Switch to smart open 2025-06-02 03:05:30 +02:00
Dreaded_X 322fc37df0 Switch from fzf to fzy 2025-06-02 03:04:21 +02:00
Dreaded_X b6c9f2db01 Added eyeline 2025-06-02 02:34:18 +02:00
Dreaded_X c8d442912f Use opts properly for gruvbox 2025-06-02 02:31:16 +02:00
Dreaded_X b696b9addd Fixed mason tool installer startup 2025-06-01 21:50:07 +02:00
Dreaded_X 55e28be32c Handle big files better 2025-06-01 21:46:51 +02:00
Dreaded_X 320d742b41 Telescope plugins should be loaded _after_ telescope 2025-06-01 21:46:48 +02:00
Dreaded_X 5c946599bc Fixed mason-lspconfig load event 2025-06-01 20:32:24 +02:00
Dreaded_X 0505c877fe Use indent from snacks 2025-06-01 20:32:20 +02:00
Dreaded_X 6c5e5bb8c0 Inform lsp of neotree file rename 2025-06-01 19:43:50 +02:00
Dreaded_X 707010aadc Use bufdel from snacks 2025-06-01 19:43:28 +02:00
Dreaded_X 3be9780454 Added snacks.nvim 2025-06-01 19:42:41 +02:00
Dreaded_X 2bbf10c370 Added scroll eof plugin 2025-06-01 14:45:26 +02:00
Dreaded_X 39f538418b Remove symbol outline plugin 2025-05-31 05:12:20 +02:00
Dreaded_X 01cca08739 Update lazy lock 2025-05-31 05:09:48 +02:00
Dreaded_X 633df0af60 Tell blink we are using normal nerd font not mono 2025-05-31 05:09:40 +02:00
Dreaded_X 525e9099e4 Cleanup in blink config 2025-05-31 05:09:16 +02:00
Dreaded_X 1c42119291 Disable ros commands as they won't work outside the devcontainer 2025-05-31 05:07:36 +02:00
Dreaded_X 7723d66cbf Improve startup speed by properly lazy loading 2025-05-31 05:06:46 +02:00
Dreaded_X 649653ef8c Use builtin yamlls schemastore 2025-05-31 03:03:48 +02:00
Dreaded_X 18f15c5ab3 Switch back to main repo for todo comments 2025-05-31 03:03:48 +02:00
Dreaded_X 5c774bbdfb Cursor sticks to character during surround operations 2025-05-31 03:03:47 +02:00
Dreaded_X e61c059de6 Proper lazy load fix for colorizer 2025-05-31 03:03:47 +02:00
Dreaded_X 82f6744c2f Setup treesitter folds in treesitter plugin init 2025-05-31 03:03:47 +02:00
Dreaded_X 2e4796d7a7 Moved LSP configs to new lsp/ folder, moved lsp config to seperate fiel, and simplified mason tool installer config 2025-05-31 03:03:47 +02:00
Dreaded_X 6c49b81f5a Add lua type annotation and make sure to use opts where possible 2025-05-31 03:03:43 +02:00
Dreaded_X d2a4babb2e Remove unused whitespace plugin 2025-05-31 00:21:17 +02:00
Dreaded_X a2335bfd1b Exit snippet when leaving insert mode 2025-05-30 21:28:30 +02:00
Dreaded_X 3efe02f0ab Disable change detection notification 2025-05-30 17:55:11 +02:00
Dreaded_X 651f32bdaf Update lazy lock 2025-05-30 17:46:57 +02:00
Dreaded_X 900e844835 More random cleanup 2025-05-30 17:46:57 +02:00
Dreaded_X f8ad93746b Split mason configs 2025-05-30 17:46:54 +02:00
Dreaded_X 644edc8b2e Use schemastore plugin for yamlls 2025-05-30 17:38:17 +02:00
Dreaded_X 3f9ec6a29f Switch from yaml-companion to schema-companion 2025-05-30 05:59:01 +02:00
Dreaded_X 7d71427f28 Auto run geuss indent 2025-05-29 22:08:57 +02:00
Dreaded_X a96448db09 Stay in insert mode when snippet is active 2025-05-29 22:08:57 +02:00
Dreaded_X 244c1929a3 Adjusted git keymaps to be easier to use 2025-05-29 22:08:53 +02:00
Dreaded_X 3291fb8111 Adjusted lsp based keymaps 2025-05-29 21:45:11 +02:00
Dreaded_X 9d72215ac6 Small gitsigns cleanup and made sure that git blame shows before everything else 2025-05-29 20:17:35 +02:00
Dreaded_X e6a7dd6af5 Change how luvit is loaded in lazydev 2025-05-29 20:16:23 +02:00
Dreaded_X dedbe6f2c8 Adjusted incremental selection keybinds 2025-05-29 20:15:34 +02:00
Dreaded_X a5695d1e32 Adjusted git sign styling 2025-05-28 21:23:25 +02:00
Dreaded_X 703c0bb087 Highlight linenumber for diagnostics instead of using signs, switched to non-mono font to allow for larger icons 2025-05-28 21:14:01 +02:00
Dreaded_X 0c074e2aec Use treesitter to set folds 2025-05-28 19:23:06 +02:00
Dreaded_X 92f62551d9 Switched to different auto pair plugin 2025-05-28 19:07:37 +02:00
Dreaded_X a11d93f6f4 Update ohmyzsh and zsh-autosuggestions 2025-05-28 19:07:37 +02:00
Dreaded_X 30d26ce769 Added zsh autopair plugin 2025-05-28 19:07:37 +02:00
Dreaded_X 637c15299b Removed old resize keymap 2025-05-28 19:07:02 +02:00
Dreaded_X 66d933cbb3 Adjusted diagnostic config 2025-05-28 17:58:57 +02:00
Dreaded_X 1ff53112ae Added ros plugin 2025-05-27 17:21:20 +02:00
Dreaded_X 38561b7dcc Fixed treesitter tag autoclose (#3) 2025-05-27 16:50:57 +02:00
Dreaded_X 7e46d955c7 Downgrade treesitter as the new version was causing issues (#1, #3, #4) 2025-05-27 16:50:52 +02:00
Dreaded_X b23736c335 Leave insert mode with esc if cmp is open but nothing is selected (#2) 2025-05-26 20:56:34 +02:00
Dreaded_X f08c4fddcd Use new border option 2025-05-26 20:56:31 +02:00
Dreaded_X 0a88d94e42 Switched to basedpywright 2025-05-26 19:07:43 +02:00
Dreaded_X ca2a7c6462 Use mason-tool-installer to install packages for conform 2025-05-26 19:07:43 +02:00
Dreaded_X 76410a8a52 Switched to blink.cmp 2025-05-26 19:07:43 +02:00
Dreaded_X fe7334fe81 Migrate to vim.lsp 2025-05-26 19:07:43 +02:00
Dreaded_X b05b3bb2ef Remove cmp-lsp-rs as it broke 2025-05-26 19:07:42 +02:00
Dreaded_X b92f5348cf Auto install conform formatters and adjusted how formatters are configured 2025-05-26 19:07:42 +02:00
Dreaded_X fc435a934c Auto install and auto start treesitter parsers 2025-05-26 19:07:42 +02:00
Dreaded_X 380308ceb6 Start with all folds unfolded 2025-05-26 19:07:42 +02:00
Dreaded_X 7a13c688d7 Remove treesitter context 2025-05-26 19:07:36 +02:00
Dreaded_X ede63fa3f1 Update treesitter to main 2025-05-26 14:24:38 +02:00
Dreaded_X 98d9158287 Neotree show current file on open 2025-05-26 02:00:42 +02:00
Dreaded_X 47d631ad21 Improve treesitter context 2025-05-26 01:27:15 +02:00
Dreaded_X 5ccfd77c84 Update neovim plugins 2025-05-25 19:11:11 +02:00
Dreaded_X 45c09c76e3 Fix LuaSnip jsregexpr install 2025-05-25 19:10:55 +02:00
Dreaded_X cf94ba2e4b Add pnpm home 2025-05-25 19:09:58 +02:00
Dreaded_X 594200f88d Added devcontainer helper function 2025-05-25 19:09:40 +02:00
Dreaded_X a0421469c0 Fixed typo 2025-05-25 18:55:19 +02:00
Dreaded_X 7be3e952fc Update neo-tree 2025-05-25 18:14:57 +02:00
Dreaded_X bfb870d59c Disable lua rocks to silence error 2025-05-25 18:14:04 +02:00
Dreaded_X 64637b19ea Improved tmux config and pane movement/resizing 2025-05-25 18:07:16 +02:00
Dreaded_X 994c0ac0b8 Changed font to Hack 2025-03-01 05:10:03 +01:00
Tim Huizinga 243020a2c7 Fixed autosuggestions in vi mode 2025-02-27 12:12:01 +01:00
Dreaded_X 1df19a07cf Improved yaml behaviour in combination with kubernetes 2025-02-19 00:46:11 +01:00
Dreaded_X c8377cdcf3 Added cargo install path to PATH 2025-01-26 06:15:33 +01:00
Dreaded_X 684445b4f7 Added back in schemastore support 2025-01-26 05:59:59 +01:00
Dreaded_X bbe09a41e6 Updated which-key description + small config changed + changed file search keybind 2025-01-26 05:29:40 +01:00
Dreaded_X 53aaf53bde Fixed tabbing through telescope results 2025-01-26 04:55:20 +01:00
Dreaded_X abba8c2901 Updated neotree config 2025-01-26 03:33:41 +01:00
Dreaded_X 5f1666094c Updated which-key config 2025-01-26 03:33:20 +01:00
Dreaded_X d3239f37f1 Updated plugins 2025-01-26 03:31:56 +01:00
Dreaded_X 0e3ae1c346 Added git lfs 2025-01-26 01:59:39 +01:00
Dreaded_X fa5bf51d41 Updated alacritty config 2024-11-24 14:33:06 +01:00
Dreaded_X 5c8b71ceb8 Upgraded from neodev to lazydev 2024-07-25 01:39:15 +02:00
Dreaded_X a4a5afe3a9 Added nvim-dap 2024-07-24 16:50:38 +02:00
Dreaded_X b3e20c39c7 Added option to use system lsp instead of mason 2024-06-28 02:07:15 +02:00
Dreaded_X fdaa5e752d Updated plugins 2024-06-28 01:47:54 +02:00
Dreaded_X ca6a204247 Fixed documentHighlight error after restarting LSP 2024-06-28 01:47:00 +02:00
Dreaded_X 84128270ff Turn off error when formatting fails 2024-06-28 01:46:31 +02:00
Dreaded_X 70b182d3cc Fixed ALTEN profile 2024-06-28 01:46:08 +02:00
Dreaded_X 7512d46578 Highlight tabs, trailing whitespace, and non-breaking spaces 2024-06-19 10:52:41 +02:00
Dreaded_X 24313cc9c0 Disabled nil_ls since it will fail to auto install 2024-06-14 01:44:07 +02:00
Dreaded_X 1b8d2d0a3c Improved git config 2024-06-14 01:39:20 +02:00
Dreaded_X b45e45939a Updated omz 2024-06-14 01:00:58 +02:00
Dreaded_X 6beca4a66b Use nvimdiff for git difftool 2024-06-14 00:56:07 +02:00
Dreaded_X 8ca75d2ecc Improved gitsigns settings 2024-06-14 00:55:27 +02:00
Dreaded_X 9af50fc20b Disable numhl for diagnostics 2024-06-14 00:05:19 +02:00
Dreaded_X c7f3f3bb17 Disabled injected formatter 2024-06-13 23:39:49 +02:00
Dreaded_X b578e7bfd4 Fixed issue with clangd 2024-06-13 23:39:00 +02:00
Dreaded_X 327b4e03e8 Removed bufferline close icons 2024-06-13 23:37:59 +02:00
Dreaded_X 527b17f445 Updated plugins 2024-06-13 23:37:35 +02:00
Dreaded_X 7db0d085f2 Reduces alacritty font size 2024-06-13 23:35:48 +02:00
Dreaded_X d5eba6dedb Updated omhmyzsh 2024-04-24 17:03:16 +02:00
Dreaded_X 69b57a0238 Updated neotree and tweaked some settings 2024-04-19 05:53:25 +02:00
Dreaded_X 82cae9a0eb Fix: LspInfo border is the wrong color 2024-04-19 04:10:42 +02:00
Dreaded_X c04978b059 Fix: GitSigns background does not match the rest of the gutter 2024-04-19 03:41:47 +02:00
Dreaded_X 9d2dc5a389 Fix: Diagnostic sign highlight also changed the background of the line number 2024-04-19 03:41:13 +02:00
Dreaded_X e4f6d92e34 Made current symbol highlight look less annoying 2024-04-19 03:10:35 +02:00
Dreaded_X 2ac9d07cef Esc now exists copy-mode-vi in tmux 2024-04-19 03:04:49 +02:00
Dreaded_X b8f72ed2ec Conform will now format injected languages 2024-04-19 03:04:49 +02:00
Dreaded_X 67180e1e1d Prevent wrapping during tmux pane navigation 2024-04-19 03:04:48 +02:00
Dreaded_X e547e69766 Added tpm 2024-04-19 03:04:48 +02:00
Dreaded_X d97d8f78fb Updated plugins 2024-04-19 03:04:48 +02:00
Dreaded_X 3c152c044c Fixed todo-comment highlighting 2024-04-19 03:04:48 +02:00
Dreaded_X ad8a5caa99 smart-splits.nvim allows for easier resizing of neovim splits, also handled tmux integration 2024-04-19 03:04:48 +02:00
Dreaded_X 1125c6543a bufresize.nvim makes sure splits stay proportional 2024-04-19 03:04:48 +02:00
Dreaded_X 6a7bc6e6c2 Turned on vi-mode for tmux 2024-04-19 03:04:48 +02:00
Dreaded_X 2060c74012 Added first custom injection for highlighting sql in sqlx query macro 2024-04-19 03:04:39 +02:00
Dreaded_X e598cf8a0d Added tmux option recommended by neovim 2024-04-17 06:04:44 +02:00
Dreaded_X 294ea0a31a Finally updated gruvbox to latest version, fixes compatibility with treesitter 2024-04-17 06:03:42 +02:00
Dreaded_X 918be36a06 Disable underlining of current scope 2024-04-17 06:02:08 +02:00
Dreaded_X 1046d91a15 Fixed typo in peek.lua setup 2024-04-16 18:38:07 +02:00
Dreaded_X 3c71bd600c Improved completion 2024-04-16 18:37:51 +02:00
Dreaded_X 5667752cf5 Disable lsp highlighting 2024-04-16 17:48:49 +02:00
Dreaded_X c133fd3861 Turned on auto update for mason-tool-installer 2024-04-16 06:04:19 +02:00
Dreaded_X da3b98c0fc Enabled severity sort for diagnostics 2024-04-16 06:03:59 +02:00
Dreaded_X 54d4d8f058 Changed how lsp window borders are set 2024-04-16 05:45:00 +02:00
Dreaded_X 7b9e749477 Improved how customized highlight groups work 2024-04-16 04:53:07 +02:00
Dreaded_X a0ec7e7784 Highlight references to current word 2024-04-16 04:53:07 +02:00
Dreaded_X f37e2a26dd Added typos to detect spelling errors 2024-04-16 04:53:07 +02:00
Dreaded_X ba2eae281b Fixed warning icon for lsp 2024-04-16 04:53:07 +02:00
Dreaded_X 302888261f Added nix support 2024-04-16 04:53:07 +02:00
Dreaded_X 5574cc866a Big neovim config refactor + adjustments 2024-04-16 04:52:38 +02:00
Dreaded_X 8031f3fe6a Adjusted colors 2024-04-15 06:29:00 +02:00
Dreaded_X b361c8863e Added styling to Telescope and floating windows 2024-04-15 05:21:35 +02:00
Dreaded_X f6b0272bcc Only highlight on bell 2024-04-13 21:57:10 +02:00
Dreaded_X 24a19a8ab1 Auto install formatters using mason 2024-04-13 21:51:57 +02:00
Dreaded_X 3e7f424616 Changed rust-analyzer settings 2024-04-13 18:14:14 +02:00
Dreaded_X cf6ffdb83a Switch to async formatting automatically if the formatter is slow 2024-04-13 18:13:38 +02:00
Dreaded_X 228cd34087 Only colorize hex codes 2024-04-13 18:11:09 +02:00
Dreaded_X 2ac26b8d7a FormatEnable and FormatDisable now actually works 2024-04-13 16:59:57 +02:00
Dreaded_X b19f90dc7f Changed a couple of nvim settings, added some keybinds, disabled treej, and added conform.nvim 2024-04-13 05:38:25 +02:00
Dreaded_X f2d0e639b4 Only display date and time on local tmux session 2024-04-13 02:25:04 +02:00
Dreaded_X 0ec44b1306 F12 now disables outer tmux, allows for nesting + colors are not hardcoded 2024-04-13 02:18:13 +02:00
Dreaded_X e5678437e8 Disable warning when entering root 2024-04-13 02:17:00 +02:00
Dreaded_X afed6c8ff5 Redid tmux theme + small tweaks to config file 2024-04-13 01:30:40 +02:00
Dreaded_X cbd71f346e Adjusted zsh prompt 2024-04-13 01:26:05 +02:00
Dreaded_X 1a854cfa58 Small tweak to alacritty config 2024-04-13 01:25:54 +02:00
Dreaded_X a4b767ac59 Cleanup and switched to dot- prefix now that stow has been fixed 2024-04-12 06:13:28 +02:00
Dreaded_X f75c024e77 Removed .gitignore since it contained old entry 2024-04-12 05:27:53 +02:00
Dreaded_X ee4b2a5359 Switched back to oh my zsh and updated zsh theme 2024-04-12 05:27:05 +02:00
Dreaded_X 2491100237 Updated neovim plugins 2024-04-12 01:46:32 +02:00
Dreaded_X 175e305cb2 Updated prezto 2024-04-12 01:35:52 +02:00
Dreaded_X 8367bdcba0 Enabled gopls 2024-04-12 01:04:48 +02:00
Dreaded_X b8d05a78ce Alacritty migrated from yaml to toml config 2024-02-11 18:21:04 +01:00
Dreaded_X e1e79b1d13 Added cmake language server 2024-02-11 18:20:45 +01:00
Dreaded_X 7b67f931cb Added Zig and Python lsp 2023-11-28 12:09:48 +01:00
Dreaded_X 56b21d796a Fix: Some icons in Nerf Fonts have changed or are no longer valid 2023-11-28 12:08:36 +01:00
Dreaded_X 341c2ca855 Updated nvim plugins 2023-11-28 12:08:07 +01:00
Dreaded_X 14a09934fd Added git config for work 2023-11-07 16:18:28 +01:00
Dreaded_X 8a9469e582 Added some more treesitter languages 2023-04-12 02:28:48 +02:00
Dreaded_X 7ee3d90d08 Added gitsign keybinds instead of using null-ls, as null-ls was causing issues 2023-04-12 02:18:31 +02:00
Dreaded_X f48fa6ae87 Formatting 2023-04-11 03:10:02 +02:00
Dreaded_X e3b55ba5dc Change priority order of completion 2023-04-11 03:09:07 +02:00
Dreaded_X 7cb056fb72 Make null-ls load lazy so null-ls loads after the other lsps 2023-04-11 03:08:18 +02:00
Dreaded_X 48894989e8 Set window border style 2023-04-11 01:35:44 +02:00
Dreaded_X 1640e1c3b6 Fixed formatting 2023-04-11 00:06:37 +02:00
Dreaded_X 4edc2a87b0 Enabled json, yaml and toml autocomplete 2023-04-11 00:01:00 +02:00
Dreaded_X 543e17ecf3 Removed Session.vim that was included by accident 2023-04-10 23:58:29 +02:00
Dreaded_X 8317381ebc Added peek to preview markdown files 2023-04-10 05:35:59 +02:00
Dreaded_X 04fdd708b2 Auto format on save 2023-04-10 02:08:00 +02:00
Dreaded_X 0a18490729 Changed keymap for scrolling through docs window 2023-04-10 01:53:38 +02:00
Dreaded_X 21314f80a4 Re-enabled cursor line as it actually is quite nice 2023-04-10 01:52:45 +02:00
Dreaded_X 2dc698b676 Use relative line numbers for easier navigation 2023-04-10 00:20:36 +02:00
Dreaded_X 7fead49895 Instead of cursorline auto center of scroll and search operations 2023-04-10 00:19:30 +02:00
Dreaded_X 3094523b19 Changed todo pattern to require : 2023-04-10 00:18:23 +02:00
Dreaded_X c7e652d93a Completely redid neovim configuration, based on kickstart.nvim 2023-04-08 22:10:52 +02:00
Dreaded_X c2b6680375 Setup tmux to support true color 2023-04-08 22:09:18 +02:00
Dreaded_X 4e97e05d64 Added .editorconfig to repository 2023-04-06 23:09:32 +02:00
Dreaded_X 2fb67ab8eb Changed some alacritty settings 2023-04-06 23:09:09 +02:00
Dreaded_X 7473dba170 Renamed xresources to urxvt to better reflect its purpose 2023-04-05 20:58:12 +02:00
Dreaded_X e82f6c7b14 Updated tunnel script to use olympus as defined in sshconfig 2023-04-05 20:56:22 +02:00
Dreaded_X 5d4821348c Added gdb config 2023-04-05 20:51:36 +02:00
Dreaded_X d60a020487 Added alacritty config 2023-04-05 20:50:41 +02:00
Dreaded_X 9bd672f82e Updated config to not be broken anymore 2022-05-18 03:05:06 +02:00
Dreaded_X 1037c5c229 Changed highlight colors and got rid of devicons 2022-02-08 04:48:24 +01:00
Dreaded_X 9f0048bfb2 Changed how NvimTree displays items 2022-02-08 04:13:03 +01:00
Dreaded_X eba93c0f1c Merge branch 'new' of github.com:DreadedX/dotfiles into new 2022-02-08 03:58:44 +01:00
Dreaded_X 4f387fcc6a Enhanced vim config 2022-02-08 03:58:37 +01:00
Dreaded_X 011ee52d79 Made font slightly larger 2022-02-08 03:58:04 +01:00
Dreaded_X 4996ab0f5f Added pgp signing to git 2022-02-04 05:49:33 +01:00
Dreaded_X 8ca648760f Added pgp signing to git 2022-02-04 01:14:52 +01:00
Dreaded_X e33a16da07 Fixed scrolling 2022-02-04 01:12:49 +01:00
Dreaded_X 59f55956ec Removed debug print statement 2022-02-01 03:30:53 +01:00
Dreaded_X d4b470989f Added tunnel script 2022-02-01 03:06:58 +01:00
Dreaded_X 0688fe49dc Make urls clickable 2022-02-01 03:05:38 +01:00
Dreaded_X 8301ce0039 Disable autocomplete in comment 2022-01-29 04:13:03 +01:00
Dreaded_X 795552cf2e Changed some nvim config stuff 2022-01-28 21:57:04 +01:00
Dreaded_X c0b519ed25 Tmux will now open splits and windows with the same path 2021-12-24 02:57:46 +01:00
Dreaded_X 9bb11d975f Improved diagnostic popup and added some keybindings 2021-12-23 22:57:02 +01:00
Dreaded_X 0762b5b896 Chaned some settings 2021-12-23 21:56:38 +01:00
Dreaded_X b2ce06ac46 Merge branch 'new' of https://github.com/DreadedX/dotfiles into new 2021-10-12 17:05:58 +02:00
Dreaded_X 75a09b17a7 Merge branch 'new' of https://github.com/DreadedX/dotfiles into new 2021-10-12 16:58:24 +02:00
Dreaded_X dd3714cd69 Added filters for schematics 2021-10-12 16:58:18 +02:00
Dreaded_X 20e233eede Merge branch 'new' of https://github.com/DreadedX/dotfiles into new 2021-10-12 16:51:56 +02:00
Dreaded_X ea460e4541 Increased docker timeout 2021-10-12 16:50:59 +02:00
Dreaded_X d0d99d71bc Added signature help 2021-10-12 02:36:32 +02:00
Dreaded_X 001a3c4161 Moved over part of config to lua and switched to intergrated lsp 2021-10-12 02:14:29 +02:00
Dreaded_X 385db48967 Updated dotfiles 2021-01-14 04:09:42 +01:00
Dreaded_X 80ee563fb3 Switched autocomplete plugin in vim 2020-06-09 03:45:50 +02:00
Dreaded_X 36c153b464 Merged 2020-01-06 02:23:56 +01:00
Dreaded_X dacbbab318 Updated vimrc 2020-01-06 02:18:46 +01:00
Dreaded_X 29a3ff9632 Added OmniSharp and updated Plug 2019-12-20 02:53:18 +01:00
Dreaded_X fcea0eb494 General updates and fixed tmux 2019-12-06 01:00:04 +01:00
Dreaded_X 57c82c4a34 Fixed delimitmate and added diagnotics display 2019-06-27 23:20:23 +02:00
Dreaded_X 76093987ef Improved stuff 2019-06-08 22:20:51 +00:00
Dreaded_X d0a40498ae Switched to urxvt 2019-06-07 16:11:20 +02:00
Dreaded_X 013c4c426e vimrc overhaul 2019-06-07 16:11:02 +02:00
Dreaded_X 82e0622233 Improved folding 2018-12-07 14:34:00 +01:00
Dreaded_X b4fedfc8ef Updated vim stuff 2018-12-07 14:23:21 +01:00
Dreaded_X dbcd0b84f2 Added some vim keybindings 2018-09-14 00:21:46 +02:00
Dreaded_X ca14315786 Properly show hostname on ssh connection 2018-06-27 19:19:58 +00:00
Dreaded_X cec0f5db85 Fixed zsh stow ignore and added modified agnoster theme, still needs to be put in the correct place manually 2018-06-27 21:17:30 +02:00
Dreaded_X 05d2752cc5 Small changes 2018-06-27 20:04:37 +02:00
Dreaded_X ac73691870 Removed unused config 2018-04-19 19:19:19 +02:00
Dreaded_X df01147684 Redid all configs 2018-04-19 19:05:56 +02:00
642 changed files with 3964 additions and 33698 deletions
+4
View File
@@ -0,0 +1,4 @@
root = true
[*]
indent_style = tab
+21 -49
View File
@@ -1,49 +1,21 @@
[submodule "vim/.vim/bundle/nerdtree"] [submodule "zsh/ohmyzsh"]
path = vim/.vim/bundle/nerdtree path = zsh/ohmyzsh
url = https://github.com/scrooloose/nerdtree.git url = https://github.com/ohmyzsh/ohmyzsh
[submodule "vim/.vim/bundle/vim-tmux-navigator"] [submodule "zsh/custom/plugins/zsh-autosuggestions"]
path = vim/.vim/bundle/vim-tmux-navigator path = zsh/custom/plugins/zsh-autosuggestions
url = https://github.com/christoomey/vim-tmux-navigator.git url = https://github.com/zsh-users/zsh-autosuggestions/
[submodule "vim/.vim/bundle/YouCompleteMe"] [submodule "tmux/tpm"]
path = vim/.vim/bundle/YouCompleteMe path = tmux/tpm
url = https://github.com/Valloric/YouCompleteMe.git url = https://github.com/tmux-plugins/tpm
ignore = dirty [submodule "zsh/custom/plugins/zsh-autopair"]
[submodule "vim/.vim/bundle/tagbar"] path = zsh/custom/plugins/zsh-autopair
path = vim/.vim/bundle/tagbar url = https://github.com/hlissner/zsh-autopair
url = https://github.com/majutsushi/tagbar.git [submodule "zsh/custom/plugins/fast-syntax-highlighting"]
[submodule "vim/.vim/bundle/tcomment_vim"] path = zsh/custom/plugins/fast-syntax-highlighting
path = vim/.vim/bundle/tcomment_vim url = https://github.com/zdharma-continuum/fast-syntax-highlighting.git
url = https://github.com/tomtom/tcomment_vim.git [submodule "zsh/custom/plugins/zsh-completions"]
[submodule "vim/.vim/bundle/vim-exchange"] path = zsh/custom/plugins/zsh-completions
path = vim/.vim/bundle/vim-exchange url = https://github.com/zsh-users/zsh-completions.git
url = https://github.com/tommcdo/vim-exchange.git [submodule "zsh/custom/plugins/zsh-vi-mode"]
[submodule "vim/.vim/bundle/tabular"] path = zsh/custom/plugins/zsh-vi-mode
path = vim/.vim/bundle/tabular url = https://github.com/jeffreytse/zsh-vi-mode
url = https://github.com/godlygeek/tabular.git
[submodule "vim/.vim/bundle/vim-surround"]
path = vim/.vim/bundle/vim-surround
url = https://github.com/tpope/vim-surround.git
[submodule "vim/.vim/bundle/vim-airline"]
path = vim/.vim/bundle/vim-airline
url = https://github.com/bling/vim-airline.git
[submodule "vim/.vim/bundle/gruvbox"]
path = vim/.vim/bundle/gruvbox
url = https://github.com/morhetz/gruvbox.git
[submodule "vim/.vim/bundle/vim-matchparenalways"]
path = vim/.vim/bundle/vim-matchparenalways
url = https://github.com/justinmk/vim-matchparenalways.git
[submodule "vim/.vim/bundle/vim-gradle"]
path = vim/.vim/bundle/vim-gradle
url = https://github.com/tfnico/vim-gradle.git
[submodule "vim/.vim/bundle/indentLine"]
path = vim/.vim/bundle/indentLine
url = https://github.com/Yggdroot/indentLine.git
[submodule "vim/.vim/bundle/delimitMate"]
path = vim/.vim/bundle/delimitMate
url = https://github.com/Raimondi/delimitMate.git
[submodule "vim/.vim/bundle/ctrlp.vim"]
path = vim/.vim/bundle/ctrlp.vim
url = https://github.com/kien/ctrlp.vim.git
[submodule "vim/.vim/bundle/vim-latex-live-preview"]
path = vim/.vim/bundle/vim-latex-live-preview
url = https://github.com/xuhdev/vim-latex-live-preview.git
+19 -9
View File
@@ -1,10 +1,20 @@
#Dotfiles ## Tools
These are my personal dotfiles.
You are free to use and change them to your liking.
##Instal ### Core tools
````
git clone https://github.com/DreadedX/dotfiles.git ~/.dotfiles ```
cd .dotfiles bat
./install.sh ~/.dotfiles fd
```` fzf
git-delta
paru
rg
zoxide
```
### Useful
```
jq
git-cliff
```
@@ -0,0 +1,22 @@
[env]
TERM = "xterm-256color"
[font]
size = 10
[font.normal]
family = "Hack Nerd Font"
[window]
decorations = "none"
dynamic_padding = true
dynamic_title = true
resize_increments = true
[window.dimensions]
columns = 80
lines = 24
[general]
import = ["/home/tim/.config/alacritty/gruvbox_dark.toml"]
@@ -0,0 +1,23 @@
[colors.bright]
black = "#928374"
blue = "#83a598"
cyan = "#8ec07c"
green = "#b8bb26"
magenta = "#d3869b"
red = "#fb4934"
white = "#ebdbb2"
yellow = "#fabd2f"
[colors.normal]
black = "#282828"
blue = "#458588"
cyan = "#689d6a"
green = "#98971a"
magenta = "#b16286"
red = "#cc241d"
white = "#a89984"
yellow = "#d79921"
[colors.primary]
background = "#282828"
foreground = "#fbf1c7"
-109
View File
@@ -1,109 +0,0 @@
## Configuration file for CAVA. Default values are commented out. Use either ; or # for commenting.
[general]
# smoothing mode, can be normal, scientific or waves.
; mode = waves
# Framerate Default: 60. Accepts only non-negative values.
; framerate = 60
# Sensitivity in %. If you think the bars are to low/response is to littei, try
# increasing this value 200 means double height. Accepts only non-negative values.
# sensitivity = 4
sensitivity = 4
# Autosens will atempt to decrease sensitivity if cava peaks. 1 = on, 0 = off
autosens = 0
# The number of bars. 0 (default) sets it to auto (fil upp console).
# width of bras and space between bars in number of characters. Default witdth 3 and space 1.
; bars = 35
bar_width = 1
bar_spacing = 1
# Lower cutoff freq for lowest bar and higheset for highest bar
# the bandwith of the visualizer, defaults to 50 - 10000 Hz
# Note: there is a minimum total bandwith of 43Mhz x number of bars.
# Cava will automaticly increase the higher cuttoff if a too low band is specified.
lower_cutoff_freq = 50
higher_cutoff_freq = 10000
[input]
# method of capturing audio, supported input methods are: 'pulse', 'alsa' or 'fifo'.
# Defaults to 'alsa'
#
# for pulseaudio 'source' wil be the source. Default: 'NULL', which uses system default source
# all pulseaudio sinks(outputs) have 'monitor' sources(inputs) associated with them
# but the default, might be your microphone, try the command 'pacmd list-sources' to find the right one
# you can change source here to the name of your prefered device, or cahnge your default pulseaudio source by running
# 'pacmd set-default-source NAME|#N'
#
# for alsa 'source' will be the capture device. Default: 'hw:Loopback,1'
# for fifo 'source' will be the path to fifo-file. Default: '/tmp/mpd.fifo'
; method = alsa
; source = hw:Loopback,1
; method = fifo
; source = /tmp/mpd.fifo
; method = pulse
; source = NULL
[output]
# method used to draw output may be ncurses, noncurses.
; method = ncurses
# visual styles, may be 'stereo' or 'mono'.
# Stereo mirrors both channels with low frequencies in center.
# Mono avrages both channels and outputs left to right lowest to highest frequencies
style = stereo
[color]
# supported colors are: red, green, yellow, magenta, cyan, white, blue, black.
; background = black
; foreground = red
gradient = 1
gradient_color_1 = '#ff0000'
gradient_color_2 = '#220000'
[smoothing]
# multiplier for the integral smoothing calculations. Takes values from 0 - 0.99.
# Higher values means smoother, but less precise. 0 to disable.
integral = 0
# disables or enables the so-called "Monstercat smoothing". Default: 1. Set to 0 to disable.
monstercat = 1
# Set gravity multiplier for "drop off". Higher values means bars will drop faster.
# Accepts only non-negative values. 0.5 means half gravity, 2 means double. Set to 0 to disable "drop off".
gravity = 100
# In bar height, bars that whould have been lower that this will not be drawn.
; ignore = 0
[eq]
# This one is tricky. You can have as much keys as you want.
# remember to uncomment more then one key! More keys = more precision.
# Look at readme.md on github for further explanations and examples.
; 1 = 1 # bass
; 2 = 3
; 3 = 2 # midtone
; 4 = 2
; 5 = 1 # treble
+7
View File
@@ -0,0 +1,7 @@
[include]
path = ~/.dotfiles/git/configs/common.gitconfig
path = ~/.dotfiles/git/profiles/aim-robotics.gitconfig
[includeIf "gitdir:~/.dotfiles/"]
path = ~/.dotfiles/git/profiles/Dreaded_X.gitconfig
+1
View File
@@ -0,0 +1 @@
../git/dot-local
+7
View File
@@ -0,0 +1,7 @@
[include]
path = ~/.dotfiles/git/configs/common.gitconfig
path = ~/.dotfiles/git/profiles/ALTEN.gitconfig
[includeIf "gitdir:~/.dotfiles"]
path = ~/.dotfiles/git/profiles/Dreaded_X.gitconfig
+1
View File
@@ -0,0 +1 @@
../git/dot-local
-10
View File
@@ -1,10 +0,0 @@
# Created by https://www.gitignore.io
### Vim ###
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
*.un~
Session.vim
.netrwhist
*~
+3
View File
@@ -0,0 +1,3 @@
gitignore
profiles
configs
+34
View File
@@ -0,0 +1,34 @@
[include]
path = ~/.dotfiles/git/configs/lfs.gitconfig
path = ~/.dotfiles/git/configs/delta.gitconfig
path = ~/.dotfiles/git/configs/sign.gitconfig
[push]
default = simple
autoSetupRemote = true
[core]
excludesfile = ~/.dotfiles/git/gitignore
[color]
ui = true
[credential]
helper = store
[pull]
; If we pull we only want to fast forward, if that is not possible we should not allow pull to work
; Instead use fetch and then either rebase or merge
ff = only
; rebase = false
[diff]
tool = nvimdiff
[init]
defaultBranch = main
[rebase]
autosquash = true
autostash = true
updateRefs = true
+54
View File
@@ -0,0 +1,54 @@
[delta "gruvmax-fang"]
# author: https://github.com/maxfangx
# Modified by: Dreaded_X
# General appearance
dark = true
syntax-theme = gruvbox-dark
# File
file-style = "#FFFFFF" bold
file-added-label = [+]
file-copied-label = [==]
file-modified-label = [*]
file-removed-label = [-]
file-renamed-label = [->]
file-decoration-style = "#434C5E" ul
file-decoration-style = "#84786A" ul
# No hunk headers
hunk-header-style = omit
# Line numbers
line-numbers = true
line-numbers-left-style = "#84786A"
line-numbers-right-style = "#84786A"
line-numbers-minus-style = "#A02A11"
line-numbers-plus-style = "#479B36"
line-numbers-zero-style = "#84786A"
line-numbers-left-format = " {nm:>3} │"
line-numbers-right-format = " {np:>3} │"
# Diff contents
inline-hint-style = syntax
minus-non-emph-style = syntax auto
plus-non-emph-style = syntax auto
whitespace-error-style = "#FB4934" reverse
# Blame
blame-code-style = syntax
# Merge conflicts
merge-conflict-begin-symbol = ⌃
merge-conflict-end-symbol = ⌄
merge-conflict-ours-diff-header-style = "#FABD2F" bold
merge-conflict-theirs-diff-header-style = "#FABD2F" bold overline
merge-conflict-ours-diff-header-decoration-style = ''
merge-conflict-theirs-diff-header-decoration-style = ''
[core]
pager = delta
[interactive]
diffFilter = delta --color-only
[delta]
features = gruvmax-fang
navigate = true
side-by-side = true
[merge]
conflictstyle = zdiff3
+5
View File
@@ -0,0 +1,5 @@
[filter "lfs"]
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
+5
View File
@@ -0,0 +1,5 @@
[user]
signingkey = CD17A34CBFB21DE9A73D47EB76BDEC4E165D8AD9
[commit]
gpgsign = true
+10
View File
@@ -0,0 +1,10 @@
[include]
path = ~/.dotfiles/git/configs/common.gitconfig
path = ~/.dotfiles/git/profiles/Dreaded_X.gitconfig
[includeIf "gitdir:~/Projects/ALTEN/"]
path = ~/.dotfiles/git/profiles/ALTEN.gitconfig
[includeIf "gitdir:~/Projects/aim-robotics/"]
path = ~/.dotfiles/git/profiles/aim-robotics.gitconfig
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
TARGET=$1
if [ -z "$TARGET" ]; then
if hash fzf 2>/dev/null; then
TARGET=$(git log -n 50 --pretty=format:'%h %s' --no-merges | fzf --border-label=' Select commit ' | cut -c -7 )
else
echo "Not installed: fzf"
exit -1
fi
fi
if [ -z "$TARGET" ]; then
echo "No target specified"
exit -1
fi
git commit --fixup=$TARGET ${@:2} && GIT_SEQUENCE_EDITOR=true git rebase -i --autostash --autosquash $TARGET^
+18
View File
@@ -0,0 +1,18 @@
# Created by https://www.gitignore.io/api/vim
### Vim ###
# swap
.sw[a-p]
.*.sw[a-p]
# session
Session.vim
# temporary
.netrwhist
*~
# auto-generated tag files
tags
# End of https://www.gitignore.io/api/vim
# Make sure we do not include vimlocal files
.vimlocal
+3
View File
@@ -0,0 +1,3 @@
[user]
name = Tim Huizinga
email = tim.huizinga@alten.nl
+3
View File
@@ -0,0 +1,3 @@
[user]
name = Dreaded_X
email = tim@huizinga.dev
+3
View File
@@ -0,0 +1,3 @@
[user]
name = Tim Huizinga
email = th@aimrobotics.nl
+8
View File
@@ -0,0 +1,8 @@
enable-ssh-support
default-cache-ttl 180800
max-cache-ttl 180800
default-cache-ttl-ssh 180800
max-cache-ttl-ssh 180800
pinentry-program /usr/bin/pinentry-tty
-30
View File
@@ -1,30 +0,0 @@
window.ssd separator:first-child + headerbar:backdrop,
window.ssd separator:first-child + headerbar,
window.ssd headerbar:first-child:backdrop,
window.ssd headerbar:first-child,
window.ssd headerbar:last-child:backdrop,
window.ssd headerbar:last-child,
window.ssd stack headerbar:first-child:backdrop,
window.ssd stack headerbar:first-child,
window.ssd stack headerbar:last-child:backdrop,
window.ssd stack headerbar:last-child,
window.ssd decoration,
window.ssd headerbar.titlebar {
border-radius: 0;
}
window.ssd headerbar * {
margin-top: -100px;
color: #222d32; /* May need to tweak, this matches Adwaita Dark */
}
window.ssd headerbar.titlebar,
window.ssd headerbar.titlebar button.titlebutton {
border: none;
font-size: 0;
height: 0;
margin: 0;
max-height: 0;
min-height: 0;
padding: 0;
}
+21
View File
@@ -0,0 +1,21 @@
#!/bin/bash
set -euo pipefail
# Install additional dependencies
sudo apt-get install fuse libfuse2 unzip ripgrep python3-venv xclip -y --no-install-recommends
# Install new version of node
curl -fsSL https://deb.nodesource.com/setup_23.x -o /tmp/nodesource_setup.sh
sudo -E bash /tmp/nodesource_setup.sh
sudo apt-get install -y nodejs
# Install new version of neovim
sudo rm -rf /usr/local/bin/nvim
sudo wget https://github.com/neovim/neovim-releases/releases/download/v0.11.1/nvim-linux-x86_64.appimage -O /usr/local/bin/nvim
sudo chmod +x /usr/local/bin/nvim
# Get latest version of dotfiles
rm -rf ~/.dotfiles
git clone https://git.huizinga.dev/Dreaded_X/dotfiles ~/.dotfiles
mkdir -p ~/.config
ln -s ~/.dotfiles/nvim/dot-config/nvim ~/.config/nvim
-69
View File
@@ -1,69 +0,0 @@
#!/bin/bash
# Show help
function show_help {
echo "Specify existing directory";
}
# Ask user
function ask {
while true; do
read -p "$1 [Y/n] " yn
case $yn in
[Nn]* ) break;;
* ) $2; break;;
esac
done
}
# Update submodules
function submodule {
git submodule update --init --recursive
}
# Apply patches
function patch {
cd $dotfiles
git am $dotfiles/patches/*.patch
}
# Comple YouCompleteMe
function ycm {
$dotfiles/vim/bundle/YouCompleteMe/install.sh
}
# Install tmux-vim-select-pane
function tvpane {
sudo curl -fsSL https://raw.github.com/mislav/dotfiles/1500cd2/bin/tmux-vim-select-pane -o /usr/local/bin/tmux-vim-select-pane
sudo chmod +x /usr/local/bin/tmux-vim-select-pane
}
# Install fonts
function fonts {
curl -fsSL https://github.com/Lokaltog/powerline-fonts/raw/master/SourceCodePro/Sauce%20Code%20Powerline%20Regular.otf -o "$HOME/.fonts/Sauce Code Powerline Regular.otf"
}
# Setup symlinks to config files
function symlink {
if [ ! -f ~/.tmux.conf ]; then ln -s $dotfiles/tmux.conf ~/.tmux.conf; fi
if [ ! -f ~/.zshrc ]; then ln -s $dotfiles/zshrc ~/.zshrc; fi
if [ ! -f ~/.vimrc ]; then ln -s $dotfiles/vimrc ~/.vimrc; fi
if [ ! -f ~/.yaourtrc ]; then ln -s $dotfiles/yaourtrc ~/.yaourtrc; fi
if [ ! -f ~/.gitignore ]; then ln -s $dotfiles/.gitignore ~/.gitignore; fi
if [ ! -d ~/.vim ]; then ln -s $dotfiles/vim ~/.vim; fi
if [ ! -d ~/.local/bin/scripts ]; then ln -s $dotfiles/scripts ~/.local/bin/scripts; fi
echo "All symlink have been made"
}
dotfiles="$1"
if [ -z "$1" ]; then show_help; exit 0; fi;
if [ ! -d $1 ]; then show_help; exit 0; fi;
cd $dotfiles
# Ask and execute the install script
ask "Update submodules" submodule
ask "Apply patches" patch
ask "Compile YCM" ycm
ask "Install tmux-vim-select-pane" tvpane
ask "Install fonts" fonts
# ask "Install gnome-terminal theme"
ask "Make symlinks" symlink
-6
View File
@@ -1,6 +0,0 @@
let g:netrw_dirhistmax =10
let g:netrw_dirhist_cnt =4
let g:netrw_dirhist_1='/home/tim/.nvim'
let g:netrw_dirhist_2='/home/tim/.dotfiles/nvim/.nvim'
let g:netrw_dirhist_3='/home/tim/Projects/cpp/arena'
let g:netrw_dirhist_4='/home/tim/Projects/cpp/stdany'
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-22
View File
@@ -1,22 +0,0 @@
" Vim Compiler File
" Compiler: gradle
if exists("current_compiler")
finish
endif
let current_compiler = "gradle"
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
CompilerSet makeprg=gradle
CompilerSet errorformat=
\%-G:%.%\\+,
\%E%f:\ %\\d%\\+:\ %m\ @\ line\ %l\\,\ column\ %c.,%-C%.%#,%Z%p^,
\%E%>%f:\ %\\d%\\+:\ %m,%C\ @\ line\ %l\\,\ column\ %c.,%-C%.%#,%Z%p^,
\%-G\\s%#,
\%-GBUILD\ SUCCESSFUL#,
\%-GTotal\ \time:\ %.%#
-204
View File
@@ -1,204 +0,0 @@
call plug#begin('~/.dotfiles/nvim/.config/nvim/plugged')
" Plug 'kien/ctrlp.vim'
" Plug 'FelikZ/ctrlp-py-matcher'
Plug 'Raimondi/delimitMate'
Plug 'morhetz/gruvbox'
" Plug 'Yggdroot/indentLine'
Plug 'scrooloose/nerdtree'
Plug 'godlygeek/tabular'
" Plug 'majutsushi/tagbar'
Plug 'tomtom/tcomment_vim'
Plug 'bling/vim-airline'
Plug 'tommcdo/vim-exchange'
Plug 'tpope/vim-surround'
Plug 'christoomey/vim-tmux-navigator'
Plug 'MarcWeber/vim-addon-mw-utils'
Plug 'tomtom/tlib_vim'
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
" Plug 'beyondmarc/glsl.vim'
Plug 'tpope/vim-dispatch'
" Plug 'freitass/todo.txt-vim'
Plug 'tpope/vim-unimpaired'
Plug 'milkypostman/vim-togglelist'
Plug 'Valloric/YouCompleteMe'
" Plug 'Shougo/deoplete.nvim'
" Plug 'vim-scripts/LanguageTool'
" Plug 'pangloss/vim-javascript'
Plug 'moll/vim-bbye'
Plug 'tpope/vim-fugitive'
Plug 'tikhomirov/vim-glsl'
Plug 'rust-lang/rust.vim'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'digitaltoad/vim-pug'
call plug#end()
silent! so .vimlocal
" let g:ctrlp_custom_ignore = '\v[\/](bin|build|docs)$'
map <silent> <C-P> :call fzf#run(fzf#wrap('custom', {'source': 'ag -g ""'}, 0))<cr>
let g:fzf_layout = { 'down': '~20%' }
let g:fzf_colors =
\ { 'fg': ['fg', 'Normal'],
\ 'bg': ['bg', 'Normal'],
\ 'hl': ['fg', 'Comment'],
\ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
\ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],
\ 'hl+': ['fg', 'Statement'],
\ 'info': ['fg', 'PreProc'],
\ 'border': ['fg', 'Ignore'],
\ 'prompt': ['fg', 'Conditional'],
\ 'pointer': ['fg', 'Exception'],
\ 'marker': ['fg', 'Keyword'],
\ 'spinner': ['fg', 'Label'],
\ 'header': ['fg', 'Comment'] }
let delimitMate_expand_cr = 1
set mouse=a
colorscheme gruvbox
set t_Co=256
set t_ZH=
set t_ZR=
set background=dark
set list lcs=tab:\│\
map <silent> <F2> :NERDTreeToggle<cr>
" map <silent> <M-2> :TagbarToggle<cr>
" map <silent> <F3> :TagbarToggle<cr>
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline_theme='gruvbox'
map <M-h> :TmuxNavigateLeft<cr>
map <M-j> :TmuxNavigateDown<cr>
map <M-k> :TmuxNavigateUp<cr>
map <M-l> :TmuxNavigateRight<cr>
" set omnifunc=syntaxcomplete#Complete " override built-in C omnicomplete with C++ OmniCppComplete plugin
" let OmniCpp_GlobalScopeSearch = 1
" let OmniCpp_DisplayMode = 1
" let OmniCpp_ShowScopeInAbbr = 0 "do not show namespace in pop-up
" let OmniCpp_ShowPrototypeInAbbr = 1 "show prototype in pop-up
" let OmniCpp_ShowAccess = 1 "show access in pop-up
" let OmniCpp_SelectFirstItem = 1 "select first item in pop-up
set completeopt=menuone,menu,preview
let g:ycm_confirm_extra_conf = 0
let g:ycm_error_symbol = ''
let g:ycm_warning_symbol = ''
let g:UltiSnipsExpandTrigger="<c-s>"
syntax on
filetype plugin indent on
au BufRead,BufNewFile *.lang setfiletype lang
set smartindent
set number
set relativenumber
set laststatus=2
set softtabstop=4
set tabstop=4
set shiftwidth=4
set noexpandtab
set completeopt-=preview
" I do not remember what this is for
" set cinkeys=0{,0},0),:,!^F,o,O,e
let g:languagetool_jar='$HOME/.local/bin/LanguageTool-3.2/languagetool-commandline.jar'
let g:languagetool_lang="nl"
map <silent> <tab> :bn<cr>
map <silent> <S-tab> :bp<cr>
map <S-J> 10j
map <S-K> 10k
map <silent> <C-B> :Bdelete<cr>
" autocmd FileType go let &makeprg="go run %:p:h/*.go"
" autocmd FileType go map <F10> :Make<cr>
"
" autocmd FileType tex map <F9> :Dispatch arara %<cr>
"
" autocmd FileType cpp map <F9> :Make<cr>
" autocmd FileType cpp map <S-F9> :Make clean all<cr>
" if filereadable(expand("%:p:h")."/CMake/default/Makefile")
" let &makeprg="cd CMake/default && make"
" autocmd FileType cpp map <F10> :Make debug<cr>
" endif
" if filereadable(expand("%:p:h")."/build/cmake/Makefile")
" function KeyBind(platform)
" let &makeprg="cd cmake/configs/".a:platform." && make"
" execute 'autocmd FileType cpp map <F10> :Start cd cmake/configs/'.a:platform.' && ./run-engine.sh; echo "\nPress [enter] to close" && read<cr>'
" execute 'autocmd FileType cpp map <S-F10> :Start cd cmake/configs/'.a:platform.' && ./debug-engine.sh<cr>'
" endfunction
" call KeyBind("linux")
" endif
map <silent> <F4> :call ToggleQuickfixList()<cr>
" map <silent> <F7> :grep -F TODO -R ./src/**/*.cpp ./include/**/*.h<cr> :cw<cr>
" map <silent> <F8> :grep -F NOTE -R ./src/**/*.cpp ./include/**/*.h<cr> :cw<cr>
function! NeatFoldText()
let line = ' ' . substitute(getline(v:foldstart), '^\s*"\?\s*\|\s*"\?\s*{{' . '{\d*\s*', '', 'g') . ' '
let lines_count = v:foldend - v:foldstart + 1
let lines_count_text = '| ' . printf("%10s", lines_count . ' lines') . ' |'
let foldchar = matchstr(&fillchars, 'fold:\zs.')
let foldtextstart = strpart('+' . repeat(foldchar, v:foldlevel*2) . line, 0, (winwidth(0)*2)/3)
let foldtextend = lines_count_text . repeat(foldchar, 8)
let foldtextlength = strlen(substitute(foldtextstart . foldtextend, '.', 'x', 'g')) + &foldcolumn
return foldtextstart . repeat(foldchar, winwidth(0)-foldtextlength) . foldtextend
endfunction
function! MyFoldText() " {{{
let line = getline(v:foldstart)
let nucolwidth = &fdc + &number * &numberwidth
let windowwidth = winwidth(0) - nucolwidth - 3
let foldedlinecount = v:foldend - v:foldstart
" expand tabs into spaces
let onetab = strpart(' ', 0, &tabstop)
let line = substitute(line, '\t', onetab, 'g')
let line = strpart(line, 0, windowwidth - 2 -len(foldedlinecount))
let fillcharcount = windowwidth - len(line) - len(foldedlinecount)
return line . '…' . repeat(" ",fillcharcount) . foldedlinecount . '…' . ' '
endfunction " }}}
fu! CustomFoldText()
"get first non-blank line
let fs = v:foldstart
while getline(fs) =~ '^\s*$' | let fs = nextnonblank(fs + 1)
endwhile
if fs > v:foldend
let line = getline(v:foldstart)
else
let line = substitute(getline(fs), '\t', repeat(' ', &tabstop), 'g')
endif
let w = winwidth(0) - &foldcolumn - (&number ? 8 : 0)
let foldSize = 1 + v:foldend - v:foldstart
let foldSizeStr = " " . foldSize . " lines "
let foldLevelStr = repeat("+--", v:foldlevel)
let lineCount = line("$")
let foldPercentage = printf("[%.1f", (foldSize*1.0)/lineCount*100) . "%] "
let expansionString = repeat(".", w - strwidth(foldSizeStr.line.foldLevelStr.foldPercentage))
return line . expansionString . foldSizeStr . foldPercentage . foldLevelStr
endf
" set foldtext=NeatFoldText()
set foldtext=CustomFoldText()
set foldcolumn=1
au BufRead *.cpp,*.go,*.js setlocal foldmethod=syntax
au BufRead *.cpp,*go,*.js setlocal foldnestmax=1
Submodule nvim/.config/nvim/plugged/LanguageTool deleted from e4f234b8a0
Submodule nvim/.config/nvim/plugged/YouCompleteMe deleted from d183f11fa7
Submodule nvim/.config/nvim/plugged/ctrlp-py-matcher deleted from a0710a4937
Submodule nvim/.config/nvim/plugged/ctrlp.vim deleted from 564176f01d
Submodule nvim/.config/nvim/plugged/delimitMate deleted from 728b57a656
Submodule nvim/.config/nvim/plugged/deoplete.nvim deleted from 816bea3a9a
Submodule nvim/.config/nvim/plugged/glsl.vim deleted from 245c525804
Submodule nvim/.config/nvim/plugged/gruvbox deleted from 16504d394e
Submodule nvim/.config/nvim/plugged/indentLine deleted from 86b9824b89
Submodule nvim/.config/nvim/plugged/nerdtree deleted from 68572ef461
Submodule nvim/.config/nvim/plugged/rust.vim deleted from 8e75da9834
Submodule nvim/.config/nvim/plugged/tabular deleted from 00e1e7fcdb
Submodule nvim/.config/nvim/plugged/tagbar deleted from 7b36c46d17
Submodule nvim/.config/nvim/plugged/tcomment_vim deleted from a48da32365
Submodule nvim/.config/nvim/plugged/tlib_vim deleted from c96db6151f
Submodule nvim/.config/nvim/plugged/todo.txt-vim deleted from 1e3a5e58ae
Submodule nvim/.config/nvim/plugged/ultisnips deleted from 423f264e75
Submodule nvim/.config/nvim/plugged/vim-addon-mw-utils deleted from 0c5612fa31
Submodule nvim/.config/nvim/plugged/vim-airline deleted from c2ffb8b3ec
Submodule nvim/.config/nvim/plugged/vim-bbye deleted from a018cbc1ba
Submodule nvim/.config/nvim/plugged/vim-cpp deleted from 83469fd71b
Submodule nvim/.config/nvim/plugged/vim-cpp-enhanced-highlight deleted from 63072927d2
Submodule nvim/.config/nvim/plugged/vim-dispatch deleted from c5b1bbe166
Submodule nvim/.config/nvim/plugged/vim-exchange deleted from 05d82b8771
Submodule nvim/.config/nvim/plugged/vim-fugitive deleted from f3ccb0c12e
Submodule nvim/.config/nvim/plugged/vim-glsl deleted from 6ea4e1983b
Submodule nvim/.config/nvim/plugged/vim-javascript deleted from 1d8c2677d2
Submodule nvim/.config/nvim/plugged/vim-javascript-syntax deleted from 9e019fccd7
Submodule nvim/.config/nvim/plugged/vim-matchparenalways deleted from d2f514ded8
Submodule nvim/.config/nvim/plugged/vim-pug deleted from ddc5592f8c
Submodule nvim/.config/nvim/plugged/vim-snippets deleted from 71d91aec38
Submodule nvim/.config/nvim/plugged/vim-surround deleted from e49d6c2459
Submodule nvim/.config/nvim/plugged/vim-tmux-navigator deleted from d724094e71
Submodule nvim/.config/nvim/plugged/vim-togglelist deleted from cafedc4986
Submodule nvim/.config/nvim/plugged/vim-unimpaired deleted from 1ac95a86c0
Submodule nvim/.config/nvim/plugged/vim-z80 deleted from 3b9e2b2858
-13
View File
@@ -1,13 +0,0 @@
#header
snippet header
#ifndef ${1:`toupper(vim_snippets#Filename('$1_H', 'UNTITLED_H'))`}
#define $1
${0}
#endif
snippet incl
#include "standard.h"
${0}
-491
View File
@@ -1,491 +0,0 @@
" Vim syntax file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2016 Nov 17
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
let s:ft = matchstr(&ft, '^\([^.]\)\+')
" A bunch of useful C keywords
syn keyword cStatement goto break return continue asm
syn keyword cLabel case default
syn keyword cConditional if else switch
syn keyword cRepeat while for do
syn keyword cTodo contained TODO FIXME XXX
syn match cTodo contained "@todo"
syn match cTodo contained "@note"
" It's easy to accidentally add a space after a backslash that was intended
" for line continuation. Some compilers allow it, which makes it
" unpredictable and should be avoided.
syn match cBadContinuation contained "\\\s\+$"
" cCommentGroup allows adding matches for special things in comments
syn cluster cCommentGroup contains=cTodo,cBadContinuation
" String and Character constants
" Highlight special characters (those which have a backslash) differently
syn match cSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)"
if !exists("c_no_utf")
syn match cSpecial display contained "\\\(u\x\{4}\|U\x\{8}\)"
endif
if !exists("c_no_cformat")
" Highlight % items in strings.
if !exists("c_no_c99") " ISO C99
syn match cFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlLjzt]\|ll\|hh\)\=\([aAbdiuoxXDOUfFeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
else
syn match cFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([bdiuoxXDOUfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
endif
syn match cFormat display "%%" contained
endif
" cCppString: same as cString, but ends at end of line
if s:ft ==# "cpp" && !exists("cpp_no_cpp11") && !exists("c_no_cformat")
" ISO C++11
syn region cString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
syn region cCppString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
elseif s:ft ==# "c" && !exists("c_no_c11") && !exists("c_no_cformat")
" ISO C99
syn region cString start=+\%(L\|U\|u8\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
syn region cCppString start=+\%(L\|U\|u8\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
else
" older C or C++
syn match cFormat display "%%" contained
syn region cString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
endif
syn region cCppSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppSkip
syn cluster cStringGroup contains=cCppString,cCppSkip
syn match cCharacter "L\='[^\\]'"
syn match cCharacter "L'[^']*'" contains=cSpecial
if exists("c_gnu")
syn match cSpecialError "L\='\\[^'\"?\\abefnrtv]'"
syn match cSpecialCharacter "L\='\\['\"?\\abefnrtv]'"
else
syn match cSpecialError "L\='\\[^'\"?\\abfnrtv]'"
syn match cSpecialCharacter "L\='\\['\"?\\abfnrtv]'"
endif
syn match cSpecialCharacter display "L\='\\\o\{1,3}'"
syn match cSpecialCharacter display "'\\x\x\{1,2}'"
syn match cSpecialCharacter display "L'\\x\x\+'"
if (s:ft ==# "c" && !exists("c_no_c11")) || (s:ft ==# "cpp" && !exists("cpp_no_cpp11"))
" ISO C11 or ISO C++ 11
if exists("c_no_cformat")
syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,@Spell extend
else
syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
endif
syn match cCharacter "[Uu]'[^\\]'"
syn match cCharacter "[Uu]'[^']*'" contains=cSpecial
if exists("c_gnu")
syn match cSpecialError "[Uu]'\\[^'\"?\\abefnrtv]'"
syn match cSpecialCharacter "[Uu]'\\['\"?\\abefnrtv]'"
else
syn match cSpecialError "[Uu]'\\[^'\"?\\abfnrtv]'"
syn match cSpecialCharacter "[Uu]'\\['\"?\\abfnrtv]'"
endif
syn match cSpecialCharacter display "[Uu]'\\\o\{1,3}'"
syn match cSpecialCharacter display "[Uu]'\\x\x\+'"
endif
"when wanted, highlight trailing white space
if exists("c_space_errors")
if !exists("c_no_trail_space_error")
syn match cSpaceError display excludenl "\s\+$"
endif
if !exists("c_no_tab_space_error")
syn match cSpaceError display " \+\t"me=e-1
endif
endif
" This should be before cErrInParen to avoid problems with #define ({ xxx })
if exists("c_curly_error")
syn match cCurlyError "}"
syn region cBlock start="{" end="}" contains=ALLBUT,cBadBlock,cCurlyError,@cParenGroup,cErrInParen,cCppParen,cErrInBracket,cCppBracket,@cStringGroup,@Spell fold
else
syn region cBlock start="{" end="}" transparent fold
endif
" Catch errors caused by wrong parenthesis and brackets.
" Also accept <% for {, %> for }, <: for [ and :> for ] (C99)
" But avoid matching <::.
syn cluster cParenGroup contains=cParenError,cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserLabel,cBitField,cOctalZero,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom
if exists("c_no_curly_error")
if s:ft ==# 'cpp' && !exists("cpp_no_cpp11")
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,@cStringGroup,@Spell
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
syn match cParenError display ")"
syn match cErrInParen display contained "^^<%\|^%>"
else
syn region cParen transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,@cStringGroup,@Spell
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
syn match cParenError display ")"
syn match cErrInParen display contained "^[{}]\|^<%\|^%>"
endif
elseif exists("c_no_bracket_error")
if s:ft ==# 'cpp' && !exists("cpp_no_cpp11")
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,@cStringGroup,@Spell
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
syn match cParenError display ")"
syn match cErrInParen display contained "<%\|%>"
else
syn region cParen transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,@cStringGroup,@Spell
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
syn match cParenError display ")"
syn match cErrInParen display contained "[{}]\|<%\|%>"
endif
else
if s:ft ==# 'cpp' && !exists("cpp_no_cpp11")
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,@cStringGroup,@Spell
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell
syn match cParenError display "[\])]"
syn match cErrInParen display contained "<%\|%>"
syn region cBracket transparent start='\[\|<::\@!' end=']\|:>' contains=ALLBUT,@cParenGroup,cErrInParen,cCppParen,cCppBracket,@cStringGroup,@Spell
else
syn region cParen transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,@cStringGroup,@Spell
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell
syn match cParenError display "[\])]"
syn match cErrInParen display contained "[\]{}]\|<%\|%>"
syn region cBracket transparent start='\[\|<::\@!' end=']\|:>' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cErrInParen,cCppParen,cCppBracket,@cStringGroup,@Spell
endif
" cCppBracket: same as cParen but ends at end-of-line; used in cDefine
syn region cCppBracket transparent start='\[\|<::\@!' skip='\\$' excludenl end=']\|:>' end='$' contained contains=ALLBUT,@cParenGroup,cErrInParen,cParen,cBracket,cString,@Spell
syn match cErrInBracket display contained "[);{}]\|<%\|%>"
endif
if s:ft ==# 'c' || exists("cpp_no_cpp11")
syn region cBadBlock keepend start="{" end="}" contained containedin=cParen,cBracket,cBadBlock transparent fold
endif
"integer number, or floating point number without a dot and with "f".
syn case ignore
syn match cNumbers display transparent "\<\d\|\.\d" contains=cNumber,cFloat,cOctalError,cOctal
" Same, but without octal error (for comments)
syn match cNumbersCom display contained transparent "\<\d\|\.\d" contains=cNumber,cFloat,cOctal
syn match cNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>"
"hex number
syn match cNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"
" Flag the first zero of an octal number as something special
syn match cOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=cOctalZero
syn match cOctalZero display contained "\<0"
syn match cFloat display contained "\d\+f"
"floating point number, with dot, optional exponent
syn match cFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\="
"floating point number, starting with a dot, optional exponent
syn match cFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
"floating point number, without dot, with exponent
syn match cFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>"
if !exists("c_no_c99")
"hexadecimal floating point number, optional leading digits, with dot, with exponent
syn match cFloat display contained "0x\x*\.\x\+p[-+]\=\d\+[fl]\=\>"
"hexadecimal floating point number, with leading digits, optional dot, with exponent
syn match cFloat display contained "0x\x\+\.\=p[-+]\=\d\+[fl]\=\>"
endif
" flag an octal number with wrong digits
syn match cOctalError display contained "0\o*[89]\d*"
syn case match
if exists("c_comment_strings")
" A comment can contain cString, cCharacter and cNumber.
" But a "*/" inside a cString in a cComment DOES end the comment! So we
" need to use a special type of cString: cCommentString, which also ends on
" "*/", and sees a "*" at the start of the line as comment again.
" Unfortunately this doesn't very well work for // type of comments :-(
syn match cCommentSkip contained "^\s*\*\($\|\s\+\)"
syn region cCommentString contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=cSpecial,cCommentSkip
syn region cComment2String contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=cSpecial
syn region cCommentL start="//" skip="\\$" end="$" keepend contains=@cCommentGroup,cComment2String,cCharacter,cNumbersCom,cSpaceError,@Spell
if exists("c_no_comment_fold")
" Use "extend" here to have preprocessor lines not terminate halfway a
" comment.
syn region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=@cCommentGroup,cCommentStartError,cCommentString,cCharacter,cNumbersCom,cSpaceError,@Spell extend
else
syn region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=@cCommentGroup,cCommentStartError,cCommentString,cCharacter,cNumbersCom,cSpaceError,@Spell fold extend
endif
else
syn region cCommentL start="//" skip="\\$" end="$" keepend contains=@cCommentGroup,cSpaceError,@Spell
if exists("c_no_comment_fold")
syn region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=@cCommentGroup,cCommentStartError,cSpaceError,@Spell extend
else
syn region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=@cCommentGroup,cCommentStartError,cSpaceError,@Spell fold extend
endif
endif
" keep a // comment separately, it terminates a preproc. conditional
syn match cCommentError display "\*/"
syn match cCommentStartError display "/\*"me=e-1 contained
syn keyword cOperator sizeof
if exists("c_gnu")
syn keyword cStatement __asm__
syn keyword cOperator typeof __real__ __imag__
endif
syn keyword cType int long short char void
syn keyword cType signed unsigned float double
if !exists("c_no_ansi") || exists("c_ansi_typedefs")
syn keyword cType size_t ssize_t off_t wchar_t ptrdiff_t sig_atomic_t fpos_t
syn keyword cType clock_t time_t va_list jmp_buf FILE DIR div_t ldiv_t
syn keyword cType mbstate_t wctrans_t wint_t wctype_t
endif
if !exists("c_no_c99") " ISO C99
syn keyword cType _Bool bool _Complex complex _Imaginary imaginary
syn keyword cType int8_t int16_t int32_t int64_t
syn keyword cType uint8_t uint16_t uint32_t uint64_t
if !exists("c_no_bsd")
" These are BSD specific.
syn keyword cType u_int8_t u_int16_t u_int32_t u_int64_t
endif
syn keyword cType int_least8_t int_least16_t int_least32_t int_least64_t
syn keyword cType uint_least8_t uint_least16_t uint_least32_t uint_least64_t
syn keyword cType int_fast8_t int_fast16_t int_fast32_t int_fast64_t
syn keyword cType uint_fast8_t uint_fast16_t uint_fast32_t uint_fast64_t
syn keyword cType intptr_t uintptr_t
syn keyword cType intmax_t uintmax_t
endif
if exists("c_gnu")
syn keyword cType __label__ __complex__ __volatile__
endif
syn keyword cStructure struct union enum typedef
syn keyword cStorageClass static register auto volatile extern const
if exists("c_gnu")
syn keyword cStorageClass inline __attribute__
endif
if !exists("c_no_c99") && s:ft !=# 'cpp'
syn keyword cStorageClass inline restrict
endif
if !exists("c_no_c11")
syn keyword cStorageClass _Alignas alignas
syn keyword cOperator _Alignof alignof
syn keyword cStorageClass _Atomic
syn keyword cOperator _Generic
syn keyword cStorageClass _Noreturn noreturn
syn keyword cOperator _Static_assert static_assert
syn keyword cStorageClass _Thread_local thread_local
syn keyword cType char16_t char32_t
endif
if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu")
if exists("c_gnu")
syn keyword cConstant __GNUC__ __FUNCTION__ __PRETTY_FUNCTION__ __func__
endif
syn keyword cConstant __LINE__ __FILE__ __DATE__ __TIME__ __STDC__
syn keyword cConstant __STDC_VERSION__
syn keyword cConstant CHAR_BIT MB_LEN_MAX MB_CUR_MAX
syn keyword cConstant UCHAR_MAX UINT_MAX ULONG_MAX USHRT_MAX
syn keyword cConstant CHAR_MIN INT_MIN LONG_MIN SHRT_MIN
syn keyword cConstant CHAR_MAX INT_MAX LONG_MAX SHRT_MAX
syn keyword cConstant SCHAR_MIN SINT_MIN SLONG_MIN SSHRT_MIN
syn keyword cConstant SCHAR_MAX SINT_MAX SLONG_MAX SSHRT_MAX
if !exists("c_no_c99")
syn keyword cConstant __func__ __VA_ARGS__
syn keyword cConstant LLONG_MIN LLONG_MAX ULLONG_MAX
syn keyword cConstant INT8_MIN INT16_MIN INT32_MIN INT64_MIN
syn keyword cConstant INT8_MAX INT16_MAX INT32_MAX INT64_MAX
syn keyword cConstant UINT8_MAX UINT16_MAX UINT32_MAX UINT64_MAX
syn keyword cConstant INT_LEAST8_MIN INT_LEAST16_MIN INT_LEAST32_MIN INT_LEAST64_MIN
syn keyword cConstant INT_LEAST8_MAX INT_LEAST16_MAX INT_LEAST32_MAX INT_LEAST64_MAX
syn keyword cConstant UINT_LEAST8_MAX UINT_LEAST16_MAX UINT_LEAST32_MAX UINT_LEAST64_MAX
syn keyword cConstant INT_FAST8_MIN INT_FAST16_MIN INT_FAST32_MIN INT_FAST64_MIN
syn keyword cConstant INT_FAST8_MAX INT_FAST16_MAX INT_FAST32_MAX INT_FAST64_MAX
syn keyword cConstant UINT_FAST8_MAX UINT_FAST16_MAX UINT_FAST32_MAX UINT_FAST64_MAX
syn keyword cConstant INTPTR_MIN INTPTR_MAX UINTPTR_MAX
syn keyword cConstant INTMAX_MIN INTMAX_MAX UINTMAX_MAX
syn keyword cConstant PTRDIFF_MIN PTRDIFF_MAX SIG_ATOMIC_MIN SIG_ATOMIC_MAX
syn keyword cConstant SIZE_MAX WCHAR_MIN WCHAR_MAX WINT_MIN WINT_MAX
endif
syn keyword cConstant FLT_RADIX FLT_ROUNDS
syn keyword cConstant FLT_DIG FLT_MANT_DIG FLT_EPSILON
syn keyword cConstant DBL_DIG DBL_MANT_DIG DBL_EPSILON
syn keyword cConstant LDBL_DIG LDBL_MANT_DIG LDBL_EPSILON
syn keyword cConstant FLT_MIN FLT_MAX FLT_MIN_EXP FLT_MAX_EXP
syn keyword cConstant FLT_MIN_10_EXP FLT_MAX_10_EXP
syn keyword cConstant DBL_MIN DBL_MAX DBL_MIN_EXP DBL_MAX_EXP
syn keyword cConstant DBL_MIN_10_EXP DBL_MAX_10_EXP
syn keyword cConstant LDBL_MIN LDBL_MAX LDBL_MIN_EXP LDBL_MAX_EXP
syn keyword cConstant LDBL_MIN_10_EXP LDBL_MAX_10_EXP
syn keyword cConstant HUGE_VAL CLOCKS_PER_SEC NULL
syn keyword cConstant LC_ALL LC_COLLATE LC_CTYPE LC_MONETARY
syn keyword cConstant LC_NUMERIC LC_TIME
syn keyword cConstant SIG_DFL SIG_ERR SIG_IGN
syn keyword cConstant SIGABRT SIGFPE SIGILL SIGHUP SIGINT SIGSEGV SIGTERM
" Add POSIX signals as well...
syn keyword cConstant SIGABRT SIGALRM SIGCHLD SIGCONT SIGFPE SIGHUP
syn keyword cConstant SIGILL SIGINT SIGKILL SIGPIPE SIGQUIT SIGSEGV
syn keyword cConstant SIGSTOP SIGTERM SIGTRAP SIGTSTP SIGTTIN SIGTTOU
syn keyword cConstant SIGUSR1 SIGUSR2
syn keyword cConstant _IOFBF _IOLBF _IONBF BUFSIZ EOF WEOF
syn keyword cConstant FOPEN_MAX FILENAME_MAX L_tmpnam
syn keyword cConstant SEEK_CUR SEEK_END SEEK_SET
syn keyword cConstant TMP_MAX stderr stdin stdout
syn keyword cConstant EXIT_FAILURE EXIT_SUCCESS RAND_MAX
" POSIX 2001
syn keyword cConstant SIGBUS SIGPOLL SIGPROF SIGSYS SIGURG
syn keyword cConstant SIGVTALRM SIGXCPU SIGXFSZ
" non-POSIX signals
syn keyword cConstant SIGWINCH SIGINFO
" Add POSIX errors as well
syn keyword cConstant E2BIG EACCES EAGAIN EBADF EBADMSG EBUSY
syn keyword cConstant ECANCELED ECHILD EDEADLK EDOM EEXIST EFAULT
syn keyword cConstant EFBIG EILSEQ EINPROGRESS EINTR EINVAL EIO EISDIR
syn keyword cConstant EMFILE EMLINK EMSGSIZE ENAMETOOLONG ENFILE ENODEV
syn keyword cConstant ENOENT ENOEXEC ENOLCK ENOMEM ENOSPC ENOSYS
syn keyword cConstant ENOTDIR ENOTEMPTY ENOTSUP ENOTTY ENXIO EPERM
syn keyword cConstant EPIPE ERANGE EROFS ESPIPE ESRCH ETIMEDOUT EXDEV
" math.h
syn keyword cConstant M_E M_LOG2E M_LOG10E M_LN2 M_LN10 M_PI M_PI_2 M_PI_4
syn keyword cConstant M_1_PI M_2_PI M_2_SQRTPI M_SQRT2 M_SQRT1_2
endif
if !exists("c_no_c99") " ISO C99
syn keyword cConstant true false
endif
" Accept %: for # (C99)
syn region cPreCondit start="^\s*\zs\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" keepend contains=cComment,cCommentL,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError
syn match cPreConditMatch display "^\s*\zs\(%:\|#\)\s*\(else\|endif\)\>"
if !exists("c_no_if0")
syn cluster cCppOutInGroup contains=cCppInIf,cCppInElse,cCppInElse2,cCppOutIf,cCppOutIf2,cCppOutElse,cCppInSkip,cCppOutSkip
syn region cCppOutWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0\+\s*\($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse,@NoSpell fold
syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\zs\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse
if !exists("c_no_if0_fold")
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold
else
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
endif
syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\zs\(%:\|#\)\s*\(else\|elif\)" end="^\s*\zs\(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit
syn region cCppInWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\($\|//\|/\*\||\)" end=".\@=\|$" contains=cCppInIf,cCppInElse fold
syn region cCppInIf contained matchgroup=cCppInWrapper start="\d\+" end="^\s*\zs\(%:\|#\)\s*endif\>" contains=TOP,cPreCondit
if !exists("c_no_if0_fold")
syn region cCppInElse contained start="^\s*\zs\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold
else
syn region cCppInElse contained start="^\s*\zs\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2
endif
syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\zs\(%:\|#\)\s*\(else\|elif\)\([^/]\|/[^/*]\)*" end="^\s*\zs\(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
syn region cCppOutSkip contained start="^\s*\zs\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\zs\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip
syn region cCppInSkip contained matchgroup=cCppInWrapper start="^\s*\zs\(%:\|#\)\s*\(if\s\+\(\d\+\s*\($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\zs\(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc
endif
syn region cIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
syn match cIncluded display contained "<[^>]*>"
syn match cInclude display "^\s*\zs\(%:\|#\)\s*include\>\s*["<]" contains=cIncluded
"syn match cLineSkip "\\$"
syn cluster cPreProcGroup contains=cPreCondit,cIncluded,cInclude,cDefine,cErrInParen,cErrInBracket,cUserLabel,cSpecial,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cString,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cParen,cBracket,cMulti,cBadBlock
syn region cDefine start="^\s*\zs\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell
syn region cPreProc start="^\s*\zs\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell
" Highlight User Labels
syn cluster cMultiGroup contains=cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cCppParen,cCppBracket,cCppString
if s:ft ==# 'c' || exists("cpp_no_cpp11")
syn region cMulti transparent start='?' skip='::' end=':' contains=ALLBUT,@cMultiGroup,@Spell,@cStringGroup
endif
" Avoid matching foo::bar() in C++ by requiring that the next char is not ':'
syn cluster cLabelGroup contains=cUserLabel
syn match cUserCont display "^\s*\zs\I\i*\s*:$" contains=@cLabelGroup
syn match cUserCont display ";\s*\zs\I\i*\s*:$" contains=@cLabelGroup
if s:ft ==# 'cpp'
syn match cUserCont display "^\s*\zs\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
syn match cUserCont display ";\s*\zs\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
else
syn match cUserCont display "^\s*\zs\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
syn match cUserCont display ";\s*\zs\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
endif
syn match cUserLabel display "\I\i*" contained
" Avoid recognizing most bitfields as labels
syn match cBitField display "^\s*\zs\I\i*\s*:\s*[1-9]"me=e-1 contains=cType
syn match cBitField display ";\s*\zs\I\i*\s*:\s*[1-9]"me=e-1 contains=cType
if exists("c_minlines")
let b:c_minlines = c_minlines
else
if !exists("c_no_if0")
let b:c_minlines = 50 " #if 0 constructs can be long
else
let b:c_minlines = 15 " mostly for () constructs
endif
endif
if exists("c_curly_error")
syn sync fromstart
else
exec "syn sync ccomment cComment minlines=" . b:c_minlines
endif
" Define the default highlighting.
" Only used when an item doesn't have highlighting yet
hi def link cFormat cSpecial
hi def link cCppString cString
hi def link cCommentL cComment
hi def link cCommentStart cComment
hi def link cLabel Label
hi def link cUserLabel Label
hi def link cConditional Conditional
hi def link cRepeat Repeat
hi def link cCharacter Character
hi def link cSpecialCharacter cSpecial
hi def link cNumber Number
hi def link cOctal Number
hi def link cOctalZero PreProc " link this to Error if you want
hi def link cFloat Float
hi def link cOctalError cError
hi def link cParenError cError
hi def link cErrInParen cError
hi def link cErrInBracket cError
hi def link cCommentError cError
hi def link cCommentStartError cError
hi def link cSpaceError cError
hi def link cSpecialError cError
hi def link cCurlyError cError
hi def link cOperator Operator
hi def link cStructure Structure
hi def link cStorageClass StorageClass
hi def link cInclude Include
hi def link cPreProc PreProc
hi def link cDefine Macro
hi def link cIncluded cString
hi def link cError Error
hi def link cStatement Statement
hi def link cCppInWrapper cCppOutWrapper
hi def link cCppOutWrapper cPreCondit
hi def link cPreConditMatch cPreCondit
hi def link cPreCondit PreCondit
hi def link cType Type
hi def link cConstant Constant
hi def link cCommentString cString
hi def link cComment2String cString
hi def link cCommentSkip cComment
hi def link cString String
hi def link cComment Comment
hi def link cSpecial SpecialChar
hi def link cTodo Todo
hi def link cBadContinuation Error
hi def link cCppOutSkip cCppOutIf2
hi def link cCppInElse2 cCppOutIf2
hi def link cCppOutIf2 cCppOut
hi def link cCppOut Comment
let b:current_syntax = "c"
unlet s:ft
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: ts=8
-119
View File
@@ -1,119 +0,0 @@
" Vim syntax file
" Language: C++
" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
" Last Change: 2015 Nov 10
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
" Read the C syntax to start with
if version < 600
so <sfile>:p:h/c.vim
else
runtime! syntax/c.vim
unlet b:current_syntax
endif
" C++ extensions
syn keyword cppStatement new delete this friend using
syn keyword cppAccess public protected private
syn keyword cppModifier inline virtual explicit export
syn keyword cppType bool wchar_t
syn keyword cppExceptions throw try catch
syn keyword cppOperator operator typeid
syn keyword cppOperator and bitor or xor compl bitand and_eq or_eq xor_eq not not_eq
syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*<"me=e-1
syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*$"
syn keyword cppStorageClass mutable
syn keyword cppStructure class typename template namespace
syn keyword cppBoolean true false
syn keyword cppConstant __cplusplus
" C++ 11 extensions
if !exists("cpp_no_cpp11")
syn keyword cppModifier override final
syn keyword cppType nullptr_t
syn keyword cppExceptions noexcept
syn keyword cppStorageClass constexpr decltype thread_local
syn keyword cppConstant nullptr
syn keyword cppConstant ATOMIC_FLAG_INIT ATOMIC_VAR_INIT
syn keyword cppConstant ATOMIC_BOOL_LOCK_FREE ATOMIC_CHAR_LOCK_FREE
syn keyword cppConstant ATOMIC_CHAR16_T_LOCK_FREE ATOMIC_CHAR32_T_LOCK_FREE
syn keyword cppConstant ATOMIC_WCHAR_T_LOCK_FREE ATOMIC_SHORT_LOCK_FREE
syn keyword cppConstant ATOMIC_INT_LOCK_FREE ATOMIC_LONG_LOCK_FREE
syn keyword cppConstant ATOMIC_LLONG_LOCK_FREE ATOMIC_POINTER_LOCK_FREE
syn region cppRawString matchgroup=cppRawStringDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell
endif
" C++ 14 extensions
if !exists("cpp_no_cpp14")
syn match cppNumber display "\<0b[01]\+\(u\=l\{0,2}\|ll\=u\)\>"
endif
" The minimum and maximum operators in GNU C++
syn match cppMinMax "[<>]?"
" Default highlighting
if version >= 508 || !exists("did_cpp_syntax_inits")
if version < 508
let did_cpp_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink cppAccess cppStatement
HiLink cppCast cppStatement
HiLink cppExceptions Exception
HiLink cppOperator Operator
HiLink cppStatement Statement
HiLink cppModifier Type
HiLink cppType Type
HiLink cppStorageClass StorageClass
HiLink cppStructure Structure
HiLink cppBoolean Boolean
HiLink cppConstant Constant
HiLink cppRawStringDelimiter Delimiter
HiLink cppRawString String
HiLink cppNumber Number
delcommand HiLink
endif
function! RawStringEnableCodeSnip(filetype,start,end,textSnipHl) abort
let ft=toupper(a:filetype)
let group='textGroup'.ft
if exists('b:current_syntax')
let s:current_syntax=b:current_syntax
" Remove current syntax definition, as some syntax files (e.g. cpp.vim)
" do nothing if b:current_syntax is defined.
unlet b:current_syntax
endif
execute 'syntax include @'.group.' syntax/'.a:filetype.'.vim'
try
execute 'syntax include @'.group.' after/syntax/'.a:filetype.'.vim'
catch
endtry
if exists('s:current_syntax')
let b:current_syntax=s:current_syntax
else
unlet b:current_syntax
endif
execute 'syntax region textSnip'.ft.'
\ matchgroup='.a:textSnipHl.'
\ start=+'.a:start.'+ end=+'.a:end.'+
\ contains=@'.group
endfunction
call RawStringEnableCodeSnip("chaiscript", 'R"chaiscript(', ')chaiscript"', 'cppRawString')
call RawStringEnableCodeSnip("lua", 'R"lua(', ')lua"', 'cppRawString')
let b:current_syntax = "cpp"
" vim: ts=8
-39
View File
@@ -1,39 +0,0 @@
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
" @todo \ at end of line should continue on next line
" Hello this is a test to see if it auto wraps the text when the text has been
" going on for way too long
" syn match langSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)"
" We only highlight valid escape characters as for now it just ignores unknown
" thing
syn match langSpecial display contained "\\[abfnrtv]"
syn match langError "^.\+"
syn keyword langTodo contained TODO FIXME XXX NOTE
syn match langTodo contained "@todo"
syn match langTodo contained "@note"
syn region langSection start="^\s*\[" end="\]"
syn match langKey "^.\{-}\ze="
syn match langValue "[#=]\zs.*$" contains=langSub,langSpecial,langValue
syn match langValue contained "\\\n.\+" contains=langValue
" syn match langSub "{[^}]\+}" " This is for fmt support
syn match langSub "{\d\+}"
syn match langComment "[#;].*$" contains=langTodo
hi def link langTodo Todo
hi def link langSpecial Special
hi def link langSection Type
hi def link langKey Identifier
hi def link langValue String
hi def link langValue2 String
hi def link langSub Constant
hi def link langComment Comment
hi def link langError Error
let b:current_syntax = "lang"
" vim: sts=2 sw=2 et
+4
View File
@@ -0,0 +1,4 @@
tags
test.sh
.luarc.json
nvim
@@ -1,6 +1,4 @@
The MIT License (MIT) MIT License
Copyright (c) 2014 Markus Færevaag
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
+130
View File
@@ -0,0 +1,130 @@
# kickstart.nvim
### Introduction
A starting point for Neovim that is:
* Small
* Single-file (with examples of moving to multi-file)
* Documented
* Modular
This repo is meant to be used as by **YOU** to begin your Neovim journey; remove the things you don't use and add what you miss.
Distribution Alternatives:
- [LazyVim](https://www.lazyvim.org/): A delightful distribution maintained by @folke (the author of lazy.nvim, the package manager used here)
### Installation
Kickstart.nvim targets *only* the latest ['stable'](https://github.com/neovim/neovim/releases/tag/stable) and latest ['nightly'](https://github.com/neovim/neovim/releases/tag/nightly) of Neovim. If you are experiencing issues, please make sure you have the latest versions.
* Backup your previous configuration
* (Recommended) Fork this repo (so that you have your own copy that you can modify).
* Clone the kickstart repo into `$HOME/.config/nvim/` (Linux/Mac) or `~/AppData/Local/nvim/` (Windows)
* If you don't want to include it as a git repo, you can just clone it and then move the files to this location
* Start Neovim (`nvim`) and allow `lazy.nvim` to complete installation.
* Restart Neovim
* **You're ready to go!**
Additional system requirements:
- Make sure to review the readmes of the plugins if you are experiencing errors. In particular:
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation) is required for multiple [telescope](https://github.com/nvim-telescope/telescope.nvim#suggested-dependencies) pickers.
- See as well [Windows Installation](#Windows-Installation)
### Configuration And Extension
* Inside of your fork, feel free to modify any file you like! It's your fork!
* Then there are two primary configuration options available:
* Include the `lua/kickstart/plugins/*` files in your configuration.
* Add new configuration in `lua/custom/plugins/*` files, which will be auto sourced using `lazy.nvim`
* NOTE: To enable this, you need to uncomment `{ import = 'custom.plugins' }` in your `init.lua`
You can also merge updates/changes from the repo back into your fork, to keep up-to-date with any changes for the default configuration
#### Example: Adding an autopairs plugin
In the file: `lua/custom/plugins/autopairs.lua`, add:
```lua
-- File: lua/custom/plugins/autopairs.lua
return {
"windwp/nvim-autopairs",
config = function()
require("nvim-autopairs").setup {}
end,
}
```
This will automatically install `nvim-autopairs` and enable it on startup. For more information, see documentation for [lazy.nvim](https://github.com/folke/lazy.nvim).
#### Example: Adding a file tree plugin
In the file: `lua/custom/plugins/filetree.lua`, add:
```lua
-- Unless you are still migrating, remove the deprecated commands from v1.x
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
return {
"nvim-neo-tree/neo-tree.nvim",
version = "*",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
},
config = function ()
require('neo-tree').setup {}
end,
}
```
This will install the tree plugin and add the command `:NeoTree` for you. You can explore the documentation at [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim) for more information.
#### Example: Adding a file to change default options
To change default options, you can add a file in the `/after/plugin/` folder (see `:help load-plugins`) to include your own options, keymaps, autogroups, and more. The following is an example `defaults.lua` file (located at `$HOME/.config/nvim/after/plugin/defaults.lua`).
```lua
vim.opt.relativenumber = true
vim.keymap.set('n', '<leader>sr', require('telescope.builtin').resume, { desc = '[S]earch [R]esume' })
```
### Contribution
Pull-requests are welcome. The goal of this repo is not to create a Neovim configuration framework, but to offer a starting template that shows, by example, available features in Neovim. Some things that will not be included:
* Custom language server configuration (null-ls templates)
* Theming beyond a default colorscheme necessary for LSP highlight groups
Each PR, especially those which increase the line count, should have a description as to why the PR is necessary.
### FAQ
* What should I do if I already have a pre-existing neovim configuration?
* You should back it up, then delete all files associated with it.
* This includes your existing init.lua and the neovim files in `~/.local` which can be deleted with `rm -rf ~/.local/share/nvim/`
* You may also want to look at the [migration guide for lazy.nvim](https://github.com/folke/lazy.nvim#-migration-guide)
* What if I want to "uninstall" this configuration:
* See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information
* Are there any cool videos about this plugin?
* Current iteration of kickstart (coming soon)
* Here is one about the previous iteration of kickstart: [video introduction to Kickstart.nvim](https://youtu.be/stqUbv-5u2s).
### Windows Installation
Installation may require installing build tools, and updating the run command for `telescope-fzf-native`
See `telescope-fzf-native` documention for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation)
This requires:
- Install CMake, and the Microsoft C++ Build Tools on Windows
```lua
{'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }
```
+41
View File
@@ -0,0 +1,41 @@
-- Install lazy package manager
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
-- Setup
require("keymaps")
require("options")
require("autocmds")
require("lsp")
-- Configure plugins
require("lazy").setup({
{ import = "themes" },
{ import = "plugins" },
}, {
install = {
colorscheme = {
"gruvbox",
},
},
change_detection = {
notify = false,
},
rocks = {
enabled = false,
},
ui = {
border = require("symbols.window").border,
backdrop = 100,
},
})
+54
View File
@@ -0,0 +1,54 @@
{
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"actions-preview.nvim": { "branch": "master", "commit": "cb938c25edaac38d362555f19244a9cb85d561e8" },
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
"bufresize.nvim": { "branch": "master", "commit": "3b19527ab936d6910484dcc20fb59bdb12322d8b" },
"conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" },
"crates.nvim": { "branch": "main", "commit": "afcd1cc3eeceb5783676fc8464389b9216a29d05" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"eyeliner.nvim": { "branch": "main", "commit": "8f197eb30cecdf4c2cc9988a5eecc6bc34c0c7d6" },
"fidget.nvim": { "branch": "main", "commit": "889e2e96edef4e144965571d46f7a77bcc4d0ddf" },
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
"gitlab.nvim": { "branch": "develop", "commit": "0f007fcf7934426338fcb5f2f17a8d6e9f3bc514" },
"gitsigns.nvim": { "branch": "main", "commit": "8d82c240f190fc33723d48c308ccc1ed8baad69d" },
"gruvbox.nvim": { "branch": "main", "commit": "334d5fd49fc8033f26408425366c66c6390c57bb" },
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
"inc-rename.nvim": { "branch": "main", "commit": "0074b551a17338ccdcd299bd86687cc651bcb33d" },
"kubernetes.nvim": { "branch": "main", "commit": "44daf998345628a1a7034e3aaa31f4e05e4dde7c" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" },
"lualine.nvim": { "branch": "master", "commit": "f5d2a8570f8b736ddb9bb4be504355bcd6e15ec8" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "63a3c6a80538de1003373a619e29aeda27809ad3" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" },
"mason.nvim": { "branch": "main", "commit": "b03fb0f20bc1d43daf558cda981a2be22e73ac42" },
"multicolumn.nvim": { "branch": "master", "commit": "a363bdfd422abf26256f343dac4df183031f8e94" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "84c75e7a7e443586f60508d12fc50f90d9aee14e" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-colorizer.lua": { "branch": "master", "commit": "5cfe7fffbd01e17b3c1e14af85d5febdef88bd8c" },
"nvim-dap": { "branch": "master", "commit": "b0f983507e3702f073bfe1516846e58b56d4e42f" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
"nvim-lspconfig": { "branch": "master", "commit": "c588db330592fa477a70d2fee6ba20a57194bdc3" },
"nvim-surround": { "branch": "main", "commit": "9291040de8cd8a4439eb64c441e8d5d2bf884a5a" },
"nvim-treesitter": { "branch": "master", "commit": "cf12346a3414fa1b06af75c79faebe7f76df080a" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "5ca4aaa6efdcc59be46b95a3e876300cfead05ef" },
"nvim-ts-autotag": { "branch": "main", "commit": "8e1c0a389f20bf7f5b0dd0e00306c1247bda2595" },
"peek.nvim": { "branch": "master", "commit": "5820d937d5414baea5f586dc2a3d912a74636e5b" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"ros-nvim": { "branch": "main", "commit": "1ad64cd3a1e144dfea67890845f9da2e82d96900" },
"schema-companion.nvim": { "branch": "main", "commit": "bcccfe46a1796f86b81dc3be6ab80ece3664d3b2" },
"schemastore.nvim": { "branch": "main", "commit": "35d19ffb25c9cf160f515360e9d8286cdd2c3d4f" },
"scrollEOF.nvim": { "branch": "master", "commit": "e462b9a07b8166c3e8011f1dcbc6bf68b67cd8d7" },
"smart-open.nvim": { "branch": "0.3.x", "commit": "918c97cac0c33f7a116a822df144bc5bbefa4490" },
"smart-splits.nvim": { "branch": "master", "commit": "0bd02161ee5c5378bf4133fcedf53d1fc4179e1d" },
"snacks.nvim": { "branch": "main", "commit": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e" },
"sqlite.lua": { "branch": "master", "commit": "50092d60feb242602d7578398c6eb53b4a8ffe7b" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "master", "commit": "48d2656e54d3e3953ae647153ccdaffa50d4d76b" },
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
"ultimate-autopair.nvim": { "branch": "v0.6", "commit": "6b58234de921437836efe27714b2026ed2ee235a" },
"undotree": { "branch": "master", "commit": "6fa6b57cda8459e1e4b2ca34df702f55242f4e4d" },
"which-key.nvim": { "branch": "winborder-support", "commit": "ab1a3b0d3005a95507ba6c18b96531d430370885" }
}
+32
View File
@@ -0,0 +1,32 @@
local function uv_script_interpreter(script_path)
local result = vim.system({ "uv", "python", "find", "--script", script_path }, { text = true }):wait()
if result.code == 0 then
return vim.fn.trim(result.stdout)
end
end
local function uv_interpreter()
local result = vim.system({ "uv", "python", "find" }, { text = true }):wait()
if result.code == 0 then
return vim.fn.trim(result.stdout)
end
end
return {
settings = {
basedpyright = {
analysis = {
typeCheckingMode = "standard",
},
},
python = {},
},
before_init = function(_, config)
local script = vim.api.nvim_buf_get_name(0)
local python = uv_script_interpreter(script)
if not python then
python = uv_interpreter()
end
config.settings.python.pythonPath = python
end,
}
+3
View File
@@ -0,0 +1,3 @@
return {
cmd = { "clangd", "--offset-encoding=utf-16", "--clang-tidy" },
}
+16
View File
@@ -0,0 +1,16 @@
return require("schema-companion").setup_client(
require("schema-companion").adapters.jsonls.setup({
sources = {
require("schema-companion").sources.lsp.setup(),
require("schema-companion").sources.none.setup(),
},
}),
{
settings = {
json = {
validate = { enable = true },
schemas = require("schemastore").json.schemas(),
},
},
}
)
+23
View File
@@ -0,0 +1,23 @@
return {
settings = {
Lua = {
workspace = {
checkThirdParty = false,
library = {
"./definitions",
},
},
telemetry = { enable = false },
type = {
checkTableShape = true,
},
diagnostics = {
neededFileStatus = {
-- ["no-unknown"] = "Opened",
-- ["incomplete-signature-doc"] = "Opened",
-- ["await-in-sync"] = "Opened",
},
},
},
},
}
@@ -0,0 +1,9 @@
return {
settings = {
["rust-analyzer"] = {
check = {
command = "clippy",
},
},
},
}
+9
View File
@@ -0,0 +1,9 @@
return require("schema-companion").setup_client(
require("schema-companion").adapters.taplo.setup({
sources = {
require("schema-companion").sources.lsp.setup(),
require("schema-companion").sources.none.setup(),
},
}),
{}
)
+5
View File
@@ -0,0 +1,5 @@
return {
init_options = {
diagnosticSeverity = "Hint",
},
}
+10
View File
@@ -0,0 +1,10 @@
return require("schema-companion").setup_client(
require("schema-companion").adapters.yamlls.setup({
sources = {
require("matchers.kubernetes").setup({}),
require("schema-companion").sources.lsp.setup(),
require("schema-companion").sources.none.setup(),
},
}),
{}
)
+26
View File
@@ -0,0 +1,26 @@
-- Highlight on yank
vim.api.nvim_create_autocmd("TextYankPost", {
callback = function()
vim.highlight.on_yank({ higroup = "YankHighlight" })
end,
})
-- show cursor line only in active window
vim.api.nvim_create_autocmd({ "InsertLeave", "WinEnter" }, {
callback = function()
local ok, cl = pcall(vim.api.nvim_win_get_var, 0, "auto-cursorline")
if ok and cl then
vim.wo.cursorline = true
vim.api.nvim_win_del_var(0, "auto-cursorline")
end
end,
})
vim.api.nvim_create_autocmd({ "InsertEnter", "WinLeave" }, {
callback = function()
local cl = vim.wo.cursorline
if cl then
vim.api.nvim_win_set_var(0, "auto-cursorline", cl)
vim.wo.cursorline = false
end
end,
})
+30
View File
@@ -0,0 +1,30 @@
vim.g.mapleader = " "
vim.g.maplocalleader = " "
vim.keymap.set({ "n", "v" }, "<Space>", "<Nop>", { noremap = true, silent = true })
-- Remap for dealing with word wrap
vim.keymap.set("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
vim.keymap.set("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
-- Some nice adjustments
vim.keymap.set("n", "<C-d>", "<C-d>zz")
vim.keymap.set("n", "<C-u>", "<C-u>zz")
vim.keymap.set("n", "n", "nzz")
vim.keymap.set("n", "N", "Nzz")
-- Clear search highlight by pressing esc
vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR>")
vim.api.nvim_create_autocmd("FileType", {
pattern = { "rust" },
callback = function(args)
local command = {
rust = "cargo run",
}
vim.keymap.set("n", "<F5>", function()
vim.system({ "tmux", "send-keys", "-t", ":shell", "c-u", command[args.match], "Enter" })
vim.system({ "tmux", "select-window", "-t", ":shell" })
end, { buffer = true })
end,
})
+157
View File
@@ -0,0 +1,157 @@
local diagnostic = require("symbols.diagnostic")
local methods = vim.lsp.protocol.Methods
local map = function(keys, func, desc, mode, bufnr)
mode = mode or "n"
vim.keymap.set(mode, keys, func, { desc = desc, buffer = bufnr })
end
-- General keymaps
map("[d", function()
vim.diagnostic.jump({ count = -1 })
end, "Go to previous diagnostic message")
map("]d", function()
vim.diagnostic.jump({ count = 1 })
end, "Go to next diagnostic message")
map("[e", function()
vim.diagnostic.jump({ count = -1, severity = vim.diagnostic.severity.ERROR })
end, "Go to previous error message")
map("]e", function()
vim.diagnostic.jump({ count = 1, severity = vim.diagnostic.severity.ERROR })
end, "Go to next error message")
map("<leader>e", vim.diagnostic.open_float, "Open floating diagnostic message")
map("<leader>th", function()
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
end, "Toggle inlay hints")
map("gra", function()
require("actions-preview").code_actions()
end, "Code actions", { "n", "x" })
map("grD", vim.lsp.buf.declaration, "Goto declaration")
map("grd", function()
require("telescope.builtin").lsp_definitions({ jump_type = "never" })
end, "Goto definition")
map("grt", function()
require("telescope.builtin").lsp_type_definitions()
end, "Type definition")
map("grr", function()
require("telescope.builtin").lsp_references()
end, "Goto references")
map("gri", function()
require("telescope.builtin").lsp_implementations()
end, "Goto implementation")
map("<leader>ss", function()
require("telescope.builtin").lsp_document_symbols()
end, "Document symbols")
map("<leader>sS", function()
require("telescope.builtin").lsp_dynamic_workspace_symbols()
end, "Workspace symbols")
-- Provide a placeholder rename keymap, otherwise the rename appears to works until you hit enter at which point it will fail
map("grn", function()
vim.api.nvim_echo({ { "Rename are not available in current buffer" } }, true, { err = true })
end, "Rename")
---@param client vim.lsp.Client
---@param bufnr integer
local function on_attach(client, bufnr)
-- Setup actual rename keymap if it is available
if client:supports_method(methods.textDocument_rename, bufnr) then
vim.keymap.set("n", "grn", function()
return ":IncRename " .. vim.fn.expand("<cword>")
end, { buffer = bufnr, expr = true, desc = "Rename" })
end
-- Disable lsp based syntax highlighting, I don't like it
-- TODO: Switch to this once it is available
-- vim.lsp.document_color.enable(false, bufnr)
if client.server_capabilities.semanticTokensProvider then
client.server_capabilities.semanticTokensProvider = nil
end
-- Highlight references under cursor
-- if client:supports_method(methods.textDocument_documentHighlight) then
-- local lsp_hover_hl = vim.api.nvim_create_augroup("LspHoverHighlight", { clear = false })
-- vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
-- buffer = bufnr,
-- group = lsp_hover_hl,
-- callback = vim.lsp.buf.document_highlight,
-- })
--
-- vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, {
-- buffer = bufnr,
-- group = lsp_hover_hl,
-- callback = vim.lsp.buf.clear_references,
-- })
-- end
end
vim.diagnostic.config({
severity_sort = true,
signs = {
numhl = {
[vim.diagnostic.severity.ERROR] = "DiagnosticNumError",
[vim.diagnostic.severity.WARN] = "DiagnosticNumWarn",
[vim.diagnostic.severity.HINT] = "DiagnosticNumHint",
[vim.diagnostic.severity.INFO] = "DiagnosticNumInfo",
},
text = {
[vim.diagnostic.severity.ERROR] = "",
[vim.diagnostic.severity.WARN] = "",
[vim.diagnostic.severity.HINT] = "",
[vim.diagnostic.severity.INFO] = "",
},
},
float = {
severity_sort = false,
header = "",
suffix = function(d)
local code = d.code and string.format(" (%s)", d.code) or ""
return string.format("%s [%s]", code, d.source), "NormalFloat"
end,
},
virtual_text = {
prefix = function(d)
return diagnostic[d.severity]
end,
virt_text_pos = "eol_right_align",
},
})
local register_capability = vim.lsp.handlers[methods.client_registerCapability]
vim.lsp.handlers[methods.client_registerCapability] = function(err, res, ctx)
local client = vim.lsp.get_client_by_id(ctx.client_id)
if not client then
return
end
on_attach(client, vim.api.nvim_get_current_buf())
return register_capability(err, res, ctx)
end
vim.api.nvim_create_autocmd("LspAttach", {
desc = "Configure LSP keymaps",
callback = function(args)
local client = vim.lsp.get_client_by_id(args.data.client_id)
if not client then
return
end
on_attach(client, args.buf)
end,
})
-- Manually enable lsps, if installed
if vim.fn.executable("rust_analyzer") then
vim.lsp.enable("rust_analyzer")
end
if vim.fn.executable("vtsls") then
vim.lsp.enable("vtsls")
end
@@ -0,0 +1,57 @@
---@class schema_companion.Source
local M = {}
M.name = "Kubernetes"
M.config = {}
---@param config {}
---@return schema_companion.Source
function M.setup(config)
setmetatable(M, {})
M.config = vim.tbl_deep_extend("force", {}, M.config, config)
return M
end
function M:match(_, bufnr)
local resources = {}
local current = {}
for _, line in pairs(vim.api.nvim_buf_get_lines(bufnr, 0, -1, false)) do
local _, _, group, version = line:find([[^apiVersion:%s*["']?([^%s"'/]*)/?([^%s"']*)]])
local _, _, kind = line:find([[^kind:%s*["']?([^%s"'/]*)]])
if group and group ~= "" then
current.group = group
end
if version and version ~= "" then
current.version = version
end
if kind and kind ~= "" then
current.kind = kind
end
if current.group and current.kind then
table.insert(resources, current)
current = {}
end
end
local schemas = {}
for _, resource in pairs(resources) do
local api = resource.version and ("%s/%s"):format(resource.group, resource.version) or resource.group
local schema = {
name = ("%s@%s"):format(resource.kind, api),
source = M.name,
uri = require("kubernetes").yamlls_schema(),
}
if schema then
table.insert(schemas, schema)
end
end
return schemas
end
return M
+71
View File
@@ -0,0 +1,71 @@
local window = require("symbols.window")
-- Set highlight on search
vim.o.hlsearch = true
-- Make line numbers default
vim.wo.number = true
vim.wo.relativenumber = true
-- Enable mouse mode
vim.o.mouse = "a"
-- Sync clipboard between OS and Neovim.
-- Remove this option if you want your OS clipboard to remain independent.
-- See `:help 'clipboard'`
vim.o.clipboard = "unnamedplus"
-- Enable break indent
vim.o.breakindent = true
-- Save undo history
vim.o.undofile = true
-- Case insensitive searching UNLESS /C or capital in search
vim.o.ignorecase = true
vim.o.smartcase = true
-- Keep signcolumn on by default
vim.wo.signcolumn = "yes"
-- Decrease update time
vim.o.updatetime = 250
vim.o.timeout = true
vim.o.timeoutlen = 300
-- Set completeopt to have a better completion experience
-- vim.o.completeopt = "menuone,noselect"
-- NOTE: You should make sure your terminal supports this
vim.o.termguicolors = true
-- Default tab settings
-- Tab settings are automatically detected by vim-sleuth
-- Can be overridden by .editorconfig and modeline
vim.o.tabstop = 4
vim.o.softtabstop = 4
vim.o.shiftwidth = 4
vim.o.expandtab = false
vim.o.smarttab = true
-- Ask for confirmation instead of failing
vim.o.confirm = true
-- Turn on cursorline
vim.o.cursorline = true
-- Don't show mode, powerline already shows it
vim.o.showmode = false
-- Minimum number of screen lines above and below the cursor
vim.o.scrolloff = 10
-- Highlight tabs and trailing whitespace
vim.o.listchars = "trail:~,tab:¦⁃,nbsp:␣"
vim.o.list = true
-- Fold settings
vim.o.foldlevelstart = 99
-- Windows borders
vim.o.winborder = window.border
@@ -0,0 +1,28 @@
-- https://github.com/aznhe21/actions-preview.nvim
--- @module "lazy"
--- @type LazySpec
return {
"aznhe21/actions-preview.nvim",
opts = function()
local hl = require("actions-preview.highlight")
return {
backend = { "telescope" },
highlight_command = {
hl.delta(),
},
telescope = {
sorting_strategy = "ascending",
layout_strategy = "vertical",
layout_config = {
width = 0.8,
height = 0.9,
prompt_position = "top",
preview_cutoff = 20,
preview_height = function(_, _, max_lines)
return max_lines - 15
end,
},
},
}
end,
}
@@ -0,0 +1,31 @@
-- https://github.com/altermo/ultimate-autopair.nvim
--- @module "lazy"
--- @type LazySpec
return {
"altermo/ultimate-autopair.nvim",
event = { "InsertEnter", "CmdlineEnter" },
branch = "v0.6",
--- @module "ultimate-autopair"
--- @type prof.def.conf
opts = {
fastwarp = {
faster = true,
},
-- Fix single quotes in rust
config_internal_pairs = {
{
"'",
"'",
multiline = false,
nft = {},
suround = true,
cond = function(fn)
if fn.get_ft() ~= "rust" then
return true
end
return not fn.in_node({ "bounded_type", "reference_type", "type_arguments", "type_parameters" })
end,
},
},
},
}
+115
View File
@@ -0,0 +1,115 @@
-- https://github.com/saghen/blink.cmp
--- @module "lazy"
--- @type LazySpec
return {
"saghen/blink.cmp",
dependencies = { "rafamadriz/friendly-snippets" },
event = "InsertEnter",
-- use a release tag to download pre-built binaries
version = "1.*",
--- @module "blink-cmp"
--- @type blink.cmp.Config
opts = {
keymap = {
preset = "default",
["<C-space>"] = { "show", "show_documentation", "hide_documentation" },
["<C-u>"] = { "scroll_documentation_up" },
["<C-d>"] = { "scroll_documentation_down" },
["<CR>"] = { "accept", "fallback" },
["<Esc>"] = {
function(cmp)
if cmp.is_visible() then
cmp.cancel()
if cmp.get_selected_item_idx() ~= nil or cmp.snippet_active() then
return true
end
elseif cmp.snippet_active() then
vim.snippet.stop()
end
end,
"fallback",
},
["<Tab>"] = { "select_next", "snippet_forward", "fallback" },
["<S-Tab>"] = { "select_prev", "snippet_backward", "fallback" },
["<Up>"] = { "select_prev", "fallback" },
["<Down>"] = { "select_next", "fallback" },
["<C-p>"] = { "select_prev", "fallback_to_mappings" },
["<C-n>"] = { "select_next", "fallback_to_mappings" },
["<C-k>"] = { "show_signature", "hide_signature", "fallback" },
},
appearance = {
nerd_font_variant = "normal",
},
completion = {
ghost_text = {
enabled = true,
},
list = {
selection = {
preselect = false,
},
},
documentation = {
auto_show = true,
auto_show_delay_ms = 0,
},
menu = {
auto_show = true,
draw = {
columns = {
{ "label", "label_description", gap = 1 },
{ "kind", "source_name", gap = 1 },
},
components = {
source_name = {
text = function(ctx)
if ctx.source_id ~= "snippets" then
return "[" .. ctx.source_name .. "]"
end
end,
},
},
},
},
},
signature = {
enabled = true,
trigger = {
show_on_accept = true,
show_on_insert = true,
},
},
sources = {
default = {
"lazydev",
"lsp",
"path",
"snippets",
"buffer",
},
providers = {
lazydev = {
name = "LazyDev",
module = "lazydev.integrations.blink",
score_offset = 100,
},
},
},
cmdline = {
enabled = false,
},
fuzzy = { implementation = "prefer_rust_with_warning" },
},
opts_extend = { "sources.default" },
}
@@ -0,0 +1,54 @@
-- https://github.com/akinsho/bufferline.nvim
local diagnostic = require("symbols.diagnostic")
local file = require("symbols.file")
--- @module "lazy"
--- @type LazySpec
return {
"akinsho/bufferline.nvim",
--- @module "bufferline"
--- @type bufferline.UserConfig
opts = {
options = {
show_buffer_icons = false,
show_buffer_close_icons = false,
diagnostics = "nvim_lsp",
separator_style = "thick",
left_trunc_marker = "",
right_trunc_marker = "",
sort_by = "insert_at_end",
indicator = {
style = "none",
},
modified_icon = file.modified,
---@diagnostic disable-next-line: unused-local
diagnostics_indicator = function(count, level, diagnostics_dict, context)
local s = " "
for e, n in pairs(diagnostics_dict) do
local sym = e == "error" and diagnostic.error .. " "
or (e == "warning" and diagnostic.warn .. " ")
or (e == "info" and diagnostic.info .. " " or diagnostic.hint .. " ")
s = s .. n .. sym
end
return s
end,
},
},
init = function()
-- Setup keybinds to move between buffers
vim.keymap.set("n", "<tab>", function()
require("bufferline").cycle(1)
end, { silent = true, desc = "Goto next buffer" })
vim.keymap.set("n", "<S-tab>", function()
require("bufferline").cycle(-1)
end, { silent = true, desc = "Goto previous buffer" })
-- Setup keybinds to move buffers around
vim.keymap.set("n", "<leader>b[", function()
require("bufferline").move(-1)
end, { silent = true, desc = "Move buffer to left" })
vim.keymap.set("n", "<leader>b]", function()
require("bufferline").move(1)
end, { silent = true, desc = "Move buffer to right" })
end,
}
@@ -0,0 +1,7 @@
-- https://github.com/kwkarlwang/bufresize.nvim
--- @module "lazy"
--- @type LazySpec
return {
"kwkarlwang/bufresize.nvim",
opts = {},
}
@@ -0,0 +1,26 @@
-- https://github.com/NvChad/nvim-colorizer.lua
--- @module "lazy"
--- @type LazySpec
return {
"NvChad/nvim-colorizer.lua",
opts = {
lazy_load = true,
filetypes = {
"*", -- Enable color highlighting for all files
"!neo-tree", -- Exclude neo-tree
},
buftypes = {
"*",
"!prompt",
"!popup",
},
always_update = true,
options = {
parsers = {
names = {
enabled = false,
},
},
},
},
}
@@ -0,0 +1,17 @@
-- https://github.com/numToStr/Comment.nvim
--- @module "lazy"
--- @type LazySpec
return {
"numToStr/Comment.nvim",
event = "VeryLazy",
--- @module "Comment"
--- @type CommentConfig
opts = {
toggler = {
block = "gBc",
},
opleader = {
block = "gB",
},
},
}
@@ -0,0 +1,73 @@
-- https://github.com/stevearc/conform.nvim
local formatters_by_ft = {
c = { "clang-format" },
cpp = { "clang-format" },
go = { "goimports" },
python = { "ruff_organize_imports", "ruff_format" },
rust = { "rustfmt" },
javascript = { "prettier" },
javascriptreact = { "prettier" },
typescript = { "prettier" },
typescriptreact = { "prettier" },
css = { "prettier" },
markdown = { "prettier" },
yaml = { "prettier" },
lua = { "stylua" },
json = { "prettier" },
toml = { "taplo" },
-- ["*"] = { "injected" },
["_"] = { "trim_whitespace", "trim_newlines" },
}
--- @module "lazy"
--- @type LazySpec
return {
"stevearc/conform.nvim",
event = { "BufWritePre" },
cmd = { "ConformInfo" },
keys = {
{
-- Customize or remove this keymap to your liking
"<leader>f",
function()
require("conform").format({ async = true, lsp_fallback = true })
end,
mode = "",
desc = "Format buffer",
},
},
--- @module "conform"
--- @type conform.setupOpts
opts = {
formatters_by_ft = formatters_by_ft,
notify_on_error = false,
format_on_save = function(bufnr)
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
return
end
--- @type conform.FormatOpts
return { lsp_format = "fallback" }
end,
},
init = function()
vim.api.nvim_create_user_command("FormatDisable", function(args)
if args.bang then
-- FormatDisable! will disable formatting just for this buffer
vim.b.disable_autoformat = true
else
vim.g.disable_autoformat = true
end
end, {
desc = "Disable autoformat-on-save",
bang = true,
})
vim.api.nvim_create_user_command("FormatEnable", function()
vim.b.disable_autoformat = false
vim.g.disable_autoformat = false
end, {
desc = "Re-enable autoformat-on-save",
})
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
end,
}
@@ -0,0 +1,21 @@
-- https://github.com/Saecki/crates.nvim
--- @module "lazy"
--- @type LazySpec
return {
"Saecki/crates.nvim",
event = { "BufRead Cargo.toml" },
tag = "stable",
--- @type crates.UserConfig
opts = {
popup = {
hide_on_select = true,
border = require("symbols.window").border,
},
lsp = {
enabled = true,
actions = true,
completion = true,
hover = true,
},
},
}
+102
View File
@@ -0,0 +1,102 @@
-- https://github.com/mfussenegger/nvim-dap
--- @module "lazy"
--- @type LazySpec
return {
{
enabled = false,
"mfussenegger/nvim-dap",
config = function()
local dap = require("dap")
dap.adapters.cppdbg = {
id = "cppdbg",
type = "executable",
command = "OpenDebugAD7",
}
dap.configurations.cpp = {
{
name = "Launch file",
type = "cppdbg",
request = "launch",
program = function()
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file")
end,
cwd = "${workspaceFolder}",
-- stopAtEntry = true,
},
-- {
-- name = "Attach to gdbserver :1234",
-- type = "cppdbg",
-- request = "launch",
-- MIMode = "gdb",
-- miDebuggerServerAddress = "localhost:1234",
-- miDebuggerPath = "/usr/bin/gdb",
-- cwd = "${workspaceFolder}",
--
-- program = function()
-- return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file")
-- end,
-- },
}
dap.configurations.c = dap.configurations.cpp
dap.configurations.rust = dap.configurations.cpp
dap.defaults.fallback.force_external_terminal = true
dap.defaults.fallback.external_terminal = {
command = "tmux",
args = { "new-window" },
}
vim.keymap.set("n", "<F5>", function()
require("dap").continue()
end, { desc = "Continue" })
vim.keymap.set("n", "<F10>", function()
require("dap").step_over()
end, { desc = "Step over" })
vim.keymap.set("n", "<F11>", function()
require("dap").step_into()
end, { desc = "Step into" })
vim.keymap.set("n", "<F12>", function()
require("dap").step_out()
end, { desc = "Step out" })
vim.keymap.set("n", "<Leader>bp", function()
require("dap").toggle_breakpoint()
end, { desc = "Breakpoint" })
-- vim.keymap.set("n", "<Leader>lp", function()
-- require("dap").set_breakpoint(nil, nil, vim.fn.input("Log point message: "))
-- end)
vim.keymap.set("n", "<Leader>dr", function()
require("dap").repl.open()
end, { desc = "Debug repl" })
-- vim.keymap.set("n", "<Leader>dl", function()
-- require("dap").run_last()
-- end)
vim.keymap.set({ "n", "v" }, "<Leader>dh", function()
require("dap.ui.widgets").hover()
end, { desc = "Debug hover" })
vim.keymap.set("n", "<Leader>df", function()
local widgets = require("dap.ui.widgets")
widgets.centered_float(widgets.frames)
end, { desc = "Debug frames" })
vim.api.nvim_create_autocmd("FileType", {
pattern = "dap-float",
callback = function()
vim.api.nvim_buf_set_keymap(0, "n", "q", "<cmd>close!<CR>", { noremap = true, silent = true })
end,
})
end,
},
{
enabled = false,
"theHamsta/nvim-dap-virtual-text",
dependencies = {
"mfussenegger/nvim-dap",
},
opts = {
virt_text_pos = "eol",
only_first_definition = false,
},
},
}
@@ -0,0 +1,412 @@
-- https://github.com/sindrets/diffview.nvim
--- @module "lazy"
--- @type LazySpec
return {
"sindrets/diffview.nvim",
opts = function()
local actions = require("diffview.actions")
return {
use_icons = false,
-- Disable default keymaps just so we can change <leader>e -> <leader>f
keymaps = {
disable_defaults = true,
view = {
-- The `view` bindings are active in the diff buffers, only when the current
-- tabpage is a Diffview.
{
"n",
"<tab>",
actions.select_next_entry,
{ desc = "Open the diff for the next file" },
},
{
"n",
"<s-tab>",
actions.select_prev_entry,
{ desc = "Open the diff for the previous file" },
},
{
"n",
"[F",
actions.select_first_entry,
{ desc = "Open the diff for the first file" },
},
{
"n",
"]F",
actions.select_last_entry,
{ desc = "Open the diff for the last file" },
},
{
"n",
"gf",
actions.goto_file_edit,
{ desc = "Open the file in the previous tabpage" },
},
{ "n", "<C-w><C-f>", actions.goto_file_split, { desc = "Open the file in a new split" } },
{ "n", "<C-w>gf", actions.goto_file_tab, { desc = "Open the file in a new tabpage" } },
{ "n", "<leader>f", actions.focus_files, { desc = "Bring focus to the file panel" } },
{ "n", "<leader>b", actions.toggle_files, { desc = "Toggle the file panel." } },
{
"n",
"g<C-x>",
actions.cycle_layout,
{ desc = "Cycle through available layouts." },
},
{
"n",
"[x",
actions.prev_conflict,
{ desc = "In the merge-tool: jump to the previous conflict" },
},
{
"n",
"]x",
actions.next_conflict,
{ desc = "In the merge-tool: jump to the next conflict" },
},
{
"n",
"<leader>co",
actions.conflict_choose("ours"),
{ desc = "Choose the OURS version of a conflict" },
},
{
"n",
"<leader>ct",
actions.conflict_choose("theirs"),
{ desc = "Choose the THEIRS version of a conflict" },
},
{
"n",
"<leader>cb",
actions.conflict_choose("base"),
{ desc = "Choose the BASE version of a conflict" },
},
{
"n",
"<leader>ca",
actions.conflict_choose("all"),
{ desc = "Choose all the versions of a conflict" },
},
{ "n", "dx", actions.conflict_choose("none"), { desc = "Delete the conflict region" } },
{
"n",
"<leader>cO",
actions.conflict_choose_all("ours"),
{ desc = "Choose the OURS version of a conflict for the whole file" },
},
{
"n",
"<leader>cT",
actions.conflict_choose_all("theirs"),
{ desc = "Choose the THEIRS version of a conflict for the whole file" },
},
{
"n",
"<leader>cB",
actions.conflict_choose_all("base"),
{ desc = "Choose the BASE version of a conflict for the whole file" },
},
{
"n",
"<leader>cA",
actions.conflict_choose_all("all"),
{ desc = "Choose all the versions of a conflict for the whole file" },
},
{
"n",
"dX",
actions.conflict_choose_all("none"),
{ desc = "Delete the conflict region for the whole file" },
},
},
file_panel = {
{
"n",
"j",
actions.next_entry,
{ desc = "Bring the cursor to the next file entry" },
},
{
"n",
"<down>",
actions.next_entry,
{ desc = "Bring the cursor to the next file entry" },
},
{
"n",
"k",
actions.prev_entry,
{ desc = "Bring the cursor to the previous file entry" },
},
{
"n",
"<up>",
actions.prev_entry,
{ desc = "Bring the cursor to the previous file entry" },
},
{
"n",
"<cr>",
actions.select_entry,
{ desc = "Open the diff for the selected entry" },
},
{
"n",
"o",
actions.select_entry,
{ desc = "Open the diff for the selected entry" },
},
{
"n",
"l",
actions.select_entry,
{ desc = "Open the diff for the selected entry" },
},
{
"n",
"<2-LeftMouse>",
actions.select_entry,
{ desc = "Open the diff for the selected entry" },
},
{
"n",
"-",
actions.toggle_stage_entry,
{ desc = "Stage / unstage the selected entry" },
},
{
"n",
"s",
actions.toggle_stage_entry,
{ desc = "Stage / unstage the selected entry" },
},
{ "n", "S", actions.stage_all, { desc = "Stage all entries" } },
{ "n", "U", actions.unstage_all, { desc = "Unstage all entries" } },
{
"n",
"X",
actions.restore_entry,
{ desc = "Restore entry to the state on the left side" },
},
{ "n", "L", actions.open_commit_log, { desc = "Open the commit log panel" } },
{ "n", "zo", actions.open_fold, { desc = "Expand fold" } },
{ "n", "h", actions.close_fold, { desc = "Collapse fold" } },
{ "n", "zc", actions.close_fold, { desc = "Collapse fold" } },
{ "n", "za", actions.toggle_fold, { desc = "Toggle fold" } },
{ "n", "zR", actions.open_all_folds, { desc = "Expand all folds" } },
{ "n", "zM", actions.close_all_folds, { desc = "Collapse all folds" } },
{ "n", "<c-b>", actions.scroll_view(-0.25), { desc = "Scroll the view up" } },
{ "n", "<c-f>", actions.scroll_view(0.25), { desc = "Scroll the view down" } },
{
"n",
"<tab>",
actions.select_next_entry,
{ desc = "Open the diff for the next file" },
},
{
"n",
"<s-tab>",
actions.select_prev_entry,
{ desc = "Open the diff for the previous file" },
},
{
"n",
"[F",
actions.select_first_entry,
{ desc = "Open the diff for the first file" },
},
{
"n",
"]F",
actions.select_last_entry,
{ desc = "Open the diff for the last file" },
},
{
"n",
"gf",
actions.goto_file_edit,
{ desc = "Open the file in the previous tabpage" },
},
{
"n",
"<C-w><C-f>",
actions.goto_file_split,
{ desc = "Open the file in a new split" },
},
{
"n",
"<C-w>gf",
actions.goto_file_tab,
{ desc = "Open the file in a new tabpage" },
},
{
"n",
"i",
actions.listing_style,
{ desc = "Toggle between 'list' and 'tree' views" },
},
{
"n",
"f",
actions.toggle_flatten_dirs,
{ desc = "Flatten empty subdirectories in tree listing style" },
},
{
"n",
"R",
actions.refresh_files,
{ desc = "Update stats and entries in the file list" },
},
{
"n",
"<leader>f",
actions.focus_files,
{ desc = "Bring focus to the file panel" },
},
{ "n", "<leader>b", actions.toggle_files, { desc = "Toggle the file panel" } },
{ "n", "g<C-x>", actions.cycle_layout, { desc = "Cycle available layouts" } },
{ "n", "[x", actions.prev_conflict, { desc = "Go to the previous conflict" } },
{ "n", "]x", actions.next_conflict, { desc = "Go to the next conflict" } },
{ "n", "g?", actions.help("file_panel"), { desc = "Open the help panel" } },
{
"n",
"<leader>cO",
actions.conflict_choose_all("ours"),
{ desc = "Choose the OURS version of a conflict for the whole file" },
},
{
"n",
"<leader>cT",
actions.conflict_choose_all("theirs"),
{ desc = "Choose the THEIRS version of a conflict for the whole file" },
},
{
"n",
"<leader>cB",
actions.conflict_choose_all("base"),
{ desc = "Choose the BASE version of a conflict for the whole file" },
},
{
"n",
"<leader>cA",
actions.conflict_choose_all("all"),
{ desc = "Choose all the versions of a conflict for the whole file" },
},
{
"n",
"dX",
actions.conflict_choose_all("none"),
{ desc = "Delete the conflict region for the whole file" },
},
},
file_history_panel = {
{ "n", "g!", actions.options, { desc = "Open the option panel" } },
{
"n",
"<C-A-d>",
actions.open_in_diffview,
{ desc = "Open the entry under the cursor in a diffview" },
},
{
"n",
"y",
actions.copy_hash,
{ desc = "Copy the commit hash of the entry under the cursor" },
},
{ "n", "L", actions.open_commit_log, { desc = "Show commit details" } },
{
"n",
"X",
actions.restore_entry,
{ desc = "Restore file to the state from the selected entry" },
},
{ "n", "zo", actions.open_fold, { desc = "Expand fold" } },
{ "n", "zc", actions.close_fold, { desc = "Collapse fold" } },
{ "n", "h", actions.close_fold, { desc = "Collapse fold" } },
{ "n", "za", actions.toggle_fold, { desc = "Toggle fold" } },
{ "n", "zR", actions.open_all_folds, { desc = "Expand all folds" } },
{ "n", "zM", actions.close_all_folds, { desc = "Collapse all folds" } },
{
"n",
"j",
actions.next_entry,
{ desc = "Bring the cursor to the next file entry" },
},
{
"n",
"<down>",
actions.next_entry,
{ desc = "Bring the cursor to the next file entry" },
},
{
"n",
"k",
actions.prev_entry,
{ desc = "Bring the cursor to the previous file entry" },
},
{
"n",
"<up>",
actions.prev_entry,
{ desc = "Bring the cursor to the previous file entry" },
},
{
"n",
"<cr>",
actions.select_entry,
{ desc = "Open the diff for the selected entry" },
},
{
"n",
"o",
actions.select_entry,
{ desc = "Open the diff for the selected entry" },
},
{
"n",
"l",
actions.select_entry,
{ desc = "Open the diff for the selected entry" },
},
{
"n",
"<2-LeftMouse>",
actions.select_entry,
{ desc = "Open the diff for the selected entry" },
},
{ "n", "<c-b>", actions.scroll_view(-0.25), { desc = "Scroll the view up" } },
{ "n", "<c-f>", actions.scroll_view(0.25), { desc = "Scroll the view down" } },
{ "n", "<tab>", actions.select_next_entry, { desc = "Open the diff for the next file" } },
{
"n",
"<s-tab>",
actions.select_prev_entry,
{ desc = "Open the diff for the previous file" },
},
{
"n",
"[F",
actions.select_first_entry,
{ desc = "Open the diff for the first file" },
},
{ "n", "]F", actions.select_last_entry, { desc = "Open the diff for the last file" } },
{
"n",
"gf",
actions.goto_file_edit,
{ desc = "Open the file in the previous tabpage" },
},
{ "n", "<C-w><C-f>", actions.goto_file_split, { desc = "Open the file in a new split" } },
{ "n", "<C-w>gf", actions.goto_file_tab, { desc = "Open the file in a new tabpage" } },
{ "n", "<leader>f", actions.focus_files, { desc = "Bring focus to the file panel" } },
{ "n", "<leader>b", actions.toggle_files, { desc = "Toggle the file panel" } },
{ "n", "g<C-x>", actions.cycle_layout, { desc = "Cycle available layouts" } },
{ "n", "g?", actions.help("file_history_panel"), { desc = "Open the help panel" } },
},
},
}
end,
}

Some files were not shown because too many files have changed in this diff Show More