.config/nvim/lua/kamu/options.lua aktualisiert
This commit is contained in:
@@ -1,56 +1,72 @@
|
||||
in_wsl = os.getenv('WSL_DISTRO_NAME') ~= nil
|
||||
|
||||
-- https://mitchellt.com/2022/05/15/WSL-Neovim-Lua-and-the-Windows-Clipboard.html
|
||||
if in_wsl then
|
||||
vim.g.clipboard = {
|
||||
name = 'wsl clipboard',
|
||||
copy = {
|
||||
["+"] = { "clip.exe" },
|
||||
["*"] = { "clip.exe" }
|
||||
},
|
||||
paste = {
|
||||
["+"] = { 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))' },
|
||||
["*"] = { 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))' } },
|
||||
cache_enabled = true
|
||||
}
|
||||
end
|
||||
|
||||
local options = {
|
||||
autoindent = true,
|
||||
smartindent = true,
|
||||
tabstop = 2,
|
||||
shiftwidth = 2,
|
||||
expandtab = true,
|
||||
|
||||
number = true,
|
||||
relativenumber = true,
|
||||
numberwidth = 4,
|
||||
|
||||
swapfile = false,
|
||||
backup = false,
|
||||
undodir = os.getenv("HOME") .. "/.vim/undodir",
|
||||
undofile = true,
|
||||
|
||||
hlsearch = false,
|
||||
incsearch = true,
|
||||
|
||||
showtabline = 0,
|
||||
|
||||
termguicolors = true,
|
||||
|
||||
signcolumn = "yes",
|
||||
wrap = false,
|
||||
fileencoding = "utf-8",
|
||||
|
||||
scrolloff = 8,
|
||||
mouse = "a",
|
||||
|
||||
updatetime = 50,
|
||||
|
||||
-- guicursor = "a:block"
|
||||
}
|
||||
|
||||
for option, value in pairs(options) do
|
||||
vim.opt[option] = value
|
||||
end
|
||||
|
||||
in_wsl = os.getenv('WSL_DISTRO_NAME') ~= nil
|
||||
|
||||
-- https://mitchellt.com/2022/05/15/WSL-Neovim-Lua-and-the-Windows-Clipboard.html
|
||||
if in_wsl then
|
||||
vim.g.clipboard = {
|
||||
name = 'wsl clipboard',
|
||||
copy = {
|
||||
["+"] = { "clip.exe" },
|
||||
["*"] = { "clip.exe" }
|
||||
},
|
||||
paste = {
|
||||
["+"] = { 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))' },
|
||||
["*"] = { 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))' } },
|
||||
cache_enabled = true
|
||||
}
|
||||
end
|
||||
|
||||
-- if in_wsl then
|
||||
-- vim.g.clipboard = {
|
||||
-- name = 'WslClipboard',
|
||||
-- copy = {
|
||||
-- ['+'] = 'clip.exe',
|
||||
-- ['*'] = 'clip.exe',
|
||||
-- },
|
||||
-- paste = {
|
||||
-- ['+'] = 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))',
|
||||
-- ['*'] = 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))',
|
||||
-- },
|
||||
-- cache_enabled = false,
|
||||
-- }
|
||||
-- end
|
||||
|
||||
|
||||
local options = {
|
||||
autoindent = true,
|
||||
smartindent = true,
|
||||
tabstop = 2,
|
||||
shiftwidth = 2,
|
||||
expandtab = true,
|
||||
|
||||
number = true,
|
||||
relativenumber = true,
|
||||
numberwidth = 4,
|
||||
|
||||
swapfile = false,
|
||||
backup = false,
|
||||
undodir = os.getenv("HOME") .. "/.vim/undodir",
|
||||
undofile = true,
|
||||
|
||||
hlsearch = false,
|
||||
incsearch = true,
|
||||
|
||||
showtabline = 0,
|
||||
|
||||
termguicolors = true,
|
||||
|
||||
signcolumn = "yes",
|
||||
wrap = false,
|
||||
fileencoding = "utf-8",
|
||||
|
||||
scrolloff = 8,
|
||||
mouse = "a",
|
||||
|
||||
updatetime = 50,
|
||||
|
||||
-- guicursor = "a:block"
|
||||
}
|
||||
|
||||
for option, value in pairs(options) do
|
||||
vim.opt[option] = value
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user