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
23 changes: 1 addition & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This is my personal configuration for Neovim. It may not suit you, but I hope yo
* Neovim v0.10+
* Git
* make / CC (Linux)
* cmake / MSVC (Windows)
* make / gcc (Windows + [msys2](https://www.msys2.org/), see [PR#3](https://github.com/IronBlood/config.nvim/pull/3))

## Config Locations

Expand All @@ -18,27 +18,6 @@ This is my personal configuration for Neovim. It may not suit you, but I hope yo

Clone into the target folder directly, or create a symlink: `ln -s /path/to/config.nvim ~/.config/nvim` on Linux/macOS, `New-Item -ItemType Junction -Path $env:LOCALAPPDATA\nvim -Target C:\path\to\config.nvim` in PowerShell, or `mklink /J "%LOCALAPPDATA%\nvim" "C:\path\to\config.nvim"` in `cmd.exe`.

## Building Treesitter on Windows

See the archived [Windows support](https://web.archive.org/web/20250818122834/https://github.com/nvim-treesitter/nvim-treesitter/wiki/Windows-support) for full details. The short version:

- Install the **Desktop development with C++** workload (or the standalone Build Tools) so `cl.exe` is available.
- Before running `:TSUpdate`, open a shell that has the MSVC environment loaded.

`cmd.exe`

```batch
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\VsDevCmd.bat" -arch=x64
```

PowerShell

```pwsh
& "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\Launch-VsDevShell.ps1" -Arch amd64
```

Once the environment variables are set, start Neovim from that shell and run `:TSUpdate`.

## Plugins

* [base16-nvim](https://github.com/RRethy/base16-nvim) - Theme
Expand Down
5 changes: 1 addition & 4 deletions lua/config/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ M.setup = function()
},
},
}
servers["copilot-language-server"] = {}

-- LSP servers and clients are able to communicate to each other what features they support.
-- By default, Neovim doesn't support everything that is in the LSP specification.
Expand Down Expand Up @@ -292,9 +291,7 @@ M.setup = function()
---@param server_name string
---@return string
local function update_server_name(server_name)
local replacements = {
["copilot-languag-server"] = "copilot",
}
local replacements = {}

return replacements[server_name] or server_name
end
Expand Down
7 changes: 0 additions & 7 deletions lua/config/treesitter.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
local M = {}

if vim.fn.has("win32") == 1 and vim.fn.executable("cl") ~= 1 then
vim.notify(
"Tree-sitter build env not found (no cl.exe). Start from Developer PowerShell x64 before TSInstall/TSUpdate.",
vim.log.levels.WARN
)
end

M.setup = function()
vim.defer_fn(function()
require("nvim-treesitter.configs").setup({
Expand Down
3 changes: 3 additions & 0 deletions lua/plugins/completion.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ return {
"L3MON4D3/LuaSnip",
version = "2.*",
build = (function()
if vim.fn.has("win32") == 1 and vim.fn.executable("mingw32-make") then
return 'LUA_LDLIBS="-lluajit-5.1" mingw32-make install_jsregexp'
end
if vim.fn.has("win32") == 1 or vim.fn.executable("make") == 0 then
return
end
Expand Down
1 change: 1 addition & 0 deletions lua/plugins/nvim-tree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ return {
vim.keymap.set("n", "<C-n>", api.tree.toggle, opts("Toggle nvim tree"))
require("nvim-tree").setup({
git = {
enable = vim.fn.has("win32") == 0,
timeout = 10000,
},
})
Expand Down
7 changes: 3 additions & 4 deletions lua/plugins/telescope.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,16 @@ return {
build = function()
if vim.fn.has("win32") == 1 then
-- make sure CMake, and the Microsoft C++ Build Tools are installed on Windows
return 'cmake -S. -Bbuild -G "Visual Studio 17 2022" -A x64'
.. " && cmake --build build --config Release --target install"
return "mingw32-make"
else
-- for Linux and Linux-like systems
return "make"
end
end,
cond = function()
-- Windows
-- Windows + msys2
if vim.fn.has("win32") == 1 then
return vim.fn.executable("cmake") == 1
return vim.fn.executable("mingw32-make") == 1
end

-- Linux and Linux-like
Expand Down
14 changes: 0 additions & 14 deletions plugin/terminal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,6 @@ vim.api.nvim_create_autocmd("TermOpen", {
end,
})

if vim.fn.has("win32") == 1 then
if vim.fn.executable("pwsh.exe") == 1 then
vim.opt.shell = "pwsh.exe"
vim.opt.shellcmdflag = "-NoLogo -ExecutionPolicy RemoteSigned -Command"
vim.opt.shellquote = ""
vim.opt.shellxquote = ""
elseif vim.fn.executable("powershell.exe") == 1 then
vim.opt.shell = "powershell.exe"
vim.opt.shellcmdflag = "-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command"
vim.opt.shellquote = ""
vim.opt.shellxquote = ""
end
end

local function create_bottom_window(opts)
opts = opts or {}

Expand Down