Files
darcula_nvim/nvim/lua/darcula/options.lua
2026-03-26 16:44:10 -05:00

114 lines
3.9 KiB
Lua

-- The MIT License (MIT)
--
-- Copyright © 2026 Scott E. Graves <scott.e.graves@protonmail.com>
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy of this software
-- and associated documentation files (the “Software”), to deal in the Software without restriction,
-- including without limitation the rights to use, copy, modify, merge, publish, distribute,
-- sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
--
-- The above copyright notice and this permission notice shall be included in all copies or
-- substantial portions of the Software.
--
-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
-- BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--
local symbols = require("darcula.utils.symbols")
vim.g.mapleader = " "
vim.g.maplocalleader = " "
if require("darcula.utils.os").is_mac then
vim.g.python3_host_prog = "/usr/bin/python3"
end
vim.g.viminfo = "100,n" .. vim.fs.joinpath(vim.fn.stdpath("state"), "viminfo")
vim.opt.background = "dark"
vim.opt.backspace = "indent,eol,start"
vim.opt.backup = false
vim.opt.clipboard = "unnamedplus"
vim.opt.cmdheight = 1
vim.opt.colorcolumn = NV_DARCULA_COLOR_COLUMN
vim.opt.completeopt = "menu,menuone,noselect,fuzzy"
vim.opt.cursorline = true
vim.opt.diffopt = {
"internal",
"filler",
"closeoff",
"context:6",
"algorithm:histogram",
"indent-heuristic",
"linematch:60"
}
vim.opt.encoding = "UTF-8"
vim.opt.equalalways = false
vim.opt.errorbells = false
vim.opt.expandtab = true
vim.opt.fileencoding = "UTF-8"
vim.opt.fillchars = "vert: ,eob: ,stl: ,stlnc: "
vim.opt.foldcolumn = "0"
vim.opt.guicursor =
"n-v-c:block,i-ci-ve:ver25,r-cr:hor20,o:hor50,a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor,sm:block-blinkwait175-blinkoff150-blinkon175"
vim.opt.hidden = true
vim.opt.hlsearch = true
vim.opt.ignorecase = true
vim.opt.incsearch = true
vim.opt.iskeyword:append("-")
vim.opt.laststatus = 2
vim.opt.listchars =
"tab:" ..
symbols.listchars.tab ..
",space:" ..
symbols.listchars.space ..
",nbsp:" ..
symbols.listchars.nbsp ..
",trail:" ..
symbols.listchars.trail ..
",eol:" ..
symbols.listchars.eol ..
",precedes:" ..
symbols.listchars.precedes ..
",extends:" .. symbols.listchars.extends
vim.opt.matchpairs:append("<:>")
vim.opt.maxmempattern = 20000
vim.opt.more = false
vim.opt.mouse = ""
vim.opt.mousehide = false
vim.opt.number = true
vim.opt.numberwidth = 4
if not NV_DARCULA_ENABLE_COC then
vim.opt.pumborder = "rounded"
end
vim.opt.redrawtime = 10000
vim.opt.relativenumber = true
vim.opt.rtp:append(vim.fn.fnamemodify(vim.fn.stdpath("data") .. "/site", ":p"))
vim.opt.scrolloff = 8
vim.opt.selection = "inclusive"
vim.opt.shell = "bash"
vim.opt.shellcmdflag = "-lc"
vim.opt.shiftwidth = 2
vim.opt.shortmess = vim.o.shortmess .. "cI"
vim.opt.showmatch = true
vim.opt.showmode = false
vim.opt.sidescrolloff = 8
vim.opt.signcolumn = "yes"
vim.opt.smartcase = true
vim.opt.softtabstop = 2
vim.opt.splitbelow = true
vim.opt.splitright = true
vim.opt.syntax = "enable"
vim.opt.tabstop = 2
vim.opt.termguicolors = true
vim.opt.undodir = vim.fs.joinpath(vim.fn.stdpath("data"), ".undo")
vim.opt.undofile = true
vim.opt.updatetime = 250
vim.opt.wildmode = "longest:full,full"
if not NV_DARCULA_ENABLE_COC then
vim.opt.winborder = "rounded"
end
vim.opt.wrap = false
vim.opt.writebackup = false