.config/nvim/lua/kamu/options.lua aktualisiert

This commit is contained in:
2023-12-22 02:13:54 +01:00
parent a8f7bd4141
commit d53ae786dd

View File

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