diff --git a/README.md b/README.md index 6aa7592..2f7db69 100644 --- a/README.md +++ b/README.md @@ -1 +1,95 @@ -# astrovim_config \ No newline at end of file +# My [AstroNvim](https://github.com/AstroNvim/AstroNvim) config + +## How to install my config + +- First you have to install AstroNvim + - Backup your previous nvim config + + ```bash + mv ~/.config/nvim ~/.config/nvimbackup + ``` + + - Clone AstroNvim repository into ~/.config/nvim + + ```bash + git clone https://github.com/AstroNvim/AstroNvim ~/.config/nvim + nvim +PackerSync + ``` + +- Clone my config into `~/.config/nvim/user` + +```bash +git clone https://github.com/jiriks74/astronvim_config ~/.config/nvim/user +``` + +- Open nvim and run `:PackerSync` + +```bash +nvim +PackerSync +``` + +## Extra plugins included + +- [vimspector](https://github.com/puremourning/vimspector) + - Simple plugin for debugging + - You have to create a file with `Launch` config - see the [plugin repository](https://github.com/puremourning/vimspector) +- [vim-pio](https://github.com/jiriks74/vim-pio) + - PlatformIO vim plugin + - This is a fork that I modified to work with clangd as this is what is the + easiest to setup in AstroNvim +- [vimtex](https://github.com/lervag/vimtex) + - A plugin for, you guessed it, LaTex + - I have not yet learned LaTex, so I haven't tried this plugin out. + Hopefully I'll learn it and try out this plugin soon +- [markdown-preview.nvim](htps://github.com/iamcco/markdown-preview.nvim) + - Plugin for live markdown preview in a web browser +- [copilot.vim](https://github.com/github/copilot.vim) + - Github's copilot plugin for Vim + - To use the plugin you have to login with this command + - `:Copilot setup` + +## Extra mappings + +| Shortcut | Vim keybind | Description | +|----------|-----------------|-------------------| +| Space+A | ["\a"] | Alpha Dashboard | +| CTRL+E | ["\"] | Copilot accept | + +- Mappings for vimspector (debugging) + +| Shortcut | Vim keybind | Description | +|-------------|-------------------|--------------------| +| Space+d+d | ["\dd"] | Launch | +| Space+d+S | ["\dS"] | Stop | +| Space+d+c | ["\dc"] | Continue | +| Space+d+p | ["\dp"] | Pause | +| Space+d+e | ["\de"] | Reset | +| Space+d+r | ["\dr"] | Restart | +| Space+d+R | ["\dR"] | Run to cursor | +| Space+d+C | ["\dC"] | Go to current line | +| Space+d+P | ["\dP"] | Move cursor to the program counter in current frame | +| | Breakpoints | | +| Space+d+b+t | ["\dbt"] | Toggle breakpoint | +| Space+d+b+l | ["\dbl"] | List breakpoints | +| Space+d+b+c | ["\dbc"] | Clear breakpoints | +| Space+d+b+C | ["\dbC"] | Toggle CBreakpoint or LogPoint on current line | +| Space+d+b+f | ["\dbf"] | Add a function breakpoint for expression under cursor | +| Space+d+b+n | ["\dbn"] | Jump to next breakpoint | +| Space+d+b+p | ["\dbp"] | Jump to previous breakpoint | +| | Step keybinds | | +| Space+d+s+s | ["\dss"] | Step over | +| Space+d+s+i | ["\dsi"] | Step into | +| Space+d+s+o | ["\dso"] | Step out | +| | Frame keybinds | | +| Space+d+f+u | ["\dfu"] | Up frame | +| Space+d+f+d | ["\dfd"] | Down frame | + +There are also some [VSCode like keybinds setup by the plugin](https://github.com/puremourning/vimspector#visual-studio--vscode) + +- Mappings for markdown preview + +| Shortcut | Vim keybind | Description | +|-----------|------------------|-------------------------| +| Space+m+p | ["\mp"] | Markdown preview | +| Space+m+s | ["\ms"] | Markdown preview stop | +| Space+m+t | ["\mt"] | Markdown preview toggle | diff --git a/init.lua b/init.lua index 13df4fa..0dee8d4 100644 --- a/init.lua +++ b/init.lua @@ -173,7 +173,7 @@ local config = { n = { -- second key is the lefthand side of the map -- mappings seen under group name "Buffer" - ["m"] = { "Alpha", desc = "Alpha Dashboard" }, + ["a"] = { "Alpha", desc = "Alpha Dashboard" }, ["bb"] = { "tabnew", desc = "New tab" }, ["bc"] = { "BufferLinePickClose", desc = "Pick to close" }, ["bj"] = { "BufferLinePick", desc = "Pick to jump" }, @@ -207,6 +207,11 @@ local config = { ["dfu"] = { "call vimspector#UpFrame()", desc = "Up frame" }, ["dfd"] = { "call vimspector#DownFrame()", desc = "Down frame" }, + -- Mardown preview + ["mp"] = { "MarkdownPreview", desc = "Markdown preview" }, + ["ms"] = { "MarkdownPreviewStop", desc = "Markdown preview stop" }, + ["mt"] = { "MarkdownPreviewToggle", desc = "Markdown preview toggle" }, + -- quick save -- [""] = { ":w!", desc = "Save File" }, -- change description but the same command }, @@ -241,6 +246,10 @@ local config = { {"puremourning/vimspector"}, {"lervag/vimtex"}, {"jiriks74/vim-pio"}, + { + "iamcco/markdown-preview.nvim", + run = function() vim.fn["mkdp#util#install"]() end, + }, -- We also support a key value style plugin definition similar to NvChad: -- ["ray-x/lsp_signature.nvim"] = { @@ -334,6 +343,7 @@ local config = { ["s"] = { name = "Step" }, ["f"] = { name = "Frames" }, }, + ["m"] = { name = "Markdown" }, }, }, },