From beba8b3c51dc451f4e1ec3281841b0edcaf41a77 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 24 Jan 2023 12:42:50 +0100 Subject: [PATCH] fixed clipboard for wsl --- lua/config/options.lua | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index e2aa99f..5d9ddfc 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -35,7 +35,21 @@ opt.splitbelow= true opt.splitright= true opt.shiftwidth = indent opt.tabstop = indent -if vim.loop.os_uname().sysname == 'Linux' then +if vim.fn.has("wsl") == 1 then + vim.g.clipboard = { + name = "win32yank-wsl", + copy = { + ["+"] = "win32yank.exe -i --crlf", + ["*"] = "win32yank.exe -i --crlf", + }, + paste = { + ["+"] = "win32yank.exe -o --lf", + ["*"] = "win32yank.exe -o --lf", + }, + cache_enabled = 0, + } + opt.guifont= 'JetBrainsMonoNL NF:h9' -- https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/JetBrainsMono/NoLigatures/Regular/complete/JetBrains%20Mono%20NL%20Regular%20Nerd%20Font%20Complete%20Mono%20Windows%20Compatible.ttf +elseif vim.loop.os_uname().sysname == 'Linux' then opt.guifont= 'JetBrainsMono Nerd Font Mono:h7' else opt.guifont= 'JetBrainsMonoNL NF:h9' -- https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/JetBrainsMono/NoLigatures/Regular/complete/JetBrains%20Mono%20NL%20Regular%20Nerd%20Font%20Complete%20Mono%20Windows%20Compatible.ttf