Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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 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. `<leader>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.

Expand Down
8 changes: 8 additions & 0 deletions lua/simonkdev/lazy/treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading