diff --git a/README.md b/README.md index b674e6c..a81235d 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,9 @@ Other than small retouch the setup is virtually identitcal to Josean's setup, ch ## Requirements - Neovim 0.12 or later. -- A C compiler on `PATH` (e.g. gcc from MinGW) to build treesitter parsers and telescope-fzf-native. nvim-treesitter also needs the `tree-sitter` CLI, which Mason installs; on a fresh machine parsers install once Mason has it. +- A C compiler on `PATH` (e.g. gcc from MinGW) to build treesitter parsers and telescope-fzf-native. Without MSVC, the config points tree-sitter at gcc by setting `CC`. nvim-treesitter also needs the `tree-sitter` CLI, which Mason installs; on a fresh machine parsers install once Mason has it. - For Rust, rust-analyzer from your toolchain: `rustup component add rust-analyzer`. rustaceanvim starts it (and Mason's codelldb for debugging); don't install rust-analyzer through Mason. +- For octo.nvim (GitHub issues and PRs, `o…`), the [GitHub CLI](https://cli.github.com/), logged in with `gh auth login`. - For C#, the .NET 10 SDK, which the pinned Roslyn needs to install and run. Mason installs Roslyn (the language server VS Code's C# extension uses) when `dotnet` is on `PATH`, and netcoredbg. `dc` in a C# file offers *Build and debug a project*: pick a runnable project from the solution, and it builds it (build errors go to quickfix) and starts the debugger on its output. ## WSL @@ -16,7 +17,7 @@ The same config runs in WSL (Ubuntu 24.04): - **Neovim** comes from Homebrew (`brew install neovim`), which `~/.bashrc` puts on `PATH` with `eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv bash)"`. Upgrade it with `brew upgrade neovim`; CI tests the release pinned in `.github/actions/setup-nvim/action.yml`. - **Config**: a clone of this repo in `~/.config/nvim`. Update it with `git -C ~/.config/nvim pull`, then run `:Lazy restore` to check out the plugin commits in `lazy-lock.json`. Mason installs the language servers on the first interactive start (mason-lspconfig skips them in headless runs). Plugins, Mason packages and parsers live in `~/.local/share/nvim`; to reinstall them from scratch, move its `lazy`, `mason` and `site` folders aside and restart. -- **Tools**: `build-essential`, `unzip`, `ripgrep` and `fd-find` from apt (with `fdfind` linked as `~/.local/bin/fd`), Node.js from nvm for Mason's npm packages, Go, rustup with rust-analyzer, and lazygit (`brew install lazygit`). Without `dotnet`, Mason skips Roslyn, so C# has no language server. +- **Tools**: `build-essential`, `unzip`, `ripgrep` and `fd-find` from apt (with `fdfind` linked as `~/.local/bin/fd`), Node.js from nvm for Mason's npm packages, Go, rustup with rust-analyzer, lazygit (`brew install lazygit`) and the GitHub CLI (`brew install gh`). Without `dotnet`, Mason skips Roslyn, so C# has no language server. - **Clipboard**: `unnamedplus` goes through `win32yank.exe` from the Windows Neovim install, which WSL finds on the Windows `PATH`. ## Updates diff --git a/lazy-lock.json b/lazy-lock.json index 094b022..24cb301 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -46,6 +46,7 @@ "nvim-ts-autotag": { "branch": "main", "commit": "d7220b55e16ed3c04e88086256def5d282429493" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "6141a40173c6efa98242dc951ed4b6f892c97027" }, "nvim-web-devicons": { "branch": "master", "commit": "ec309a0eaff6ea967e58c275996155ab5c16938d" }, + "octo.nvim": { "branch": "master", "commit": "8461d99d13cca243f89848bf4d9fadee096f0a48" }, "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, "roslyn.nvim": { "branch": "main", "commit": "bf1bd4e70bc7068d1b4aebf4ce03cc19a86615be" }, "rustaceanvim": { "branch": "main", "commit": "9cb125de42c0256ed1bc1f9ded8d8f0381317a17" }, diff --git a/lua/simonkdev/lazy/octo.lua b/lua/simonkdev/lazy/octo.lua new file mode 100644 index 0000000..60beeb7 --- /dev/null +++ b/lua/simonkdev/lazy/octo.lua @@ -0,0 +1,20 @@ +-- GitHub issues, PRs and reviews in Neovim. Runs everything through the GitHub CLI, so `gh auth login` first. +return { + "pwntester/octo.nvim", + cmd = "Octo", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-telescope/telescope.nvim", + "nvim-tree/nvim-web-devicons", + }, + opts = { + picker = "telescope", + enable_builtin = true, -- a bare :Octo opens a picker of its commands + }, + keys = { + { "oo", "Octo", desc = "Octo: commands" }, + { "op", "Octo pr list", desc = "Octo: list pull requests" }, + { "oi", "Octo issue list", desc = "Octo: list issues" }, + { "on", "Octo notification list", desc = "Octo: notifications" }, + }, +} diff --git a/lua/simonkdev/lazy/treesitter.lua b/lua/simonkdev/lazy/treesitter.lua index b762323..b977f4f 100644 --- a/lua/simonkdev/lazy/treesitter.lua +++ b/lua/simonkdev/lazy/treesitter.lua @@ -41,6 +41,14 @@ return { config = function(_, opts) local ts = require("nvim-treesitter") + -- On Windows the tree-sitter CLI looks for MSVC and ignores a MinGW gcc on PATH ("Failed to execute the C + -- compiler"), so point it at gcc when there's no MSVC. + if vim.fn.has("win32") == 1 and not vim.env.CC and vim.fn.executable("cl") == 0 then + if vim.fn.executable("gcc") == 1 then + vim.env.CC = "gcc" + end + end + -- A no-op for installed parsers. On a fresh machine the CLI shows up once Mason has installed it. local function install() if vim.fn.executable("tree-sitter") == 1 then