You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
1.8 KiB

local opt = vim.opt
local o = vim.o
local g = vim.g
-------------------------------------- globals -----------------------------------------
-- g.toggle_theme_icon = "  "
-------------------------------------- options ------------------------------------------
o.laststatus = 3 -- this line is necessary otherwise statusline breaks
o.showmode = false
o.clipboard = "unnamedplus"
o.cursorline = true
-- o.cursorlineopt = "number"
-- Indenting
o.expandtab = true
o.shiftwidth = 2
o.smartindent = true
o.tabstop = 2
o.softtabstop = 2
opt.fillchars = { eob = " " }
o.ignorecase = true
o.smartcase = true
o.mouse = "nv"
o.mousemodel = "extend"
-- Numbers
o.number = true
o.numberwidth = 2
o.ruler = true
-- disable nvim intro
opt.shortmess:append "sI"
o.signcolumn = "yes"
o.splitbelow = true
o.splitright = true
o.timeoutlen = 400
o.undofile = true
-- interval for writing swap file to disk, also used by gitsigns
o.updatetime = 250
-- go to previous/next line with h,l,left arrow and right arrow
-- when cursor reaches end/beginning of line
opt.whichwrap:append "<>[]hl"
-- g.mapleader = " "
-- disable some default providers
vim.g["loaded_node_provider"] = 0
vim.g["loaded_python3_provider"] = 0
vim.g["loaded_perl_provider"] = 0
vim.g["loaded_ruby_provider"] = 0
-- add binaries installed by mason.nvim to path
local is_windows = vim.fn.has "win32" ~= 0
vim.env.PATH = vim.fn.stdpath "data" .. "/mason/bin" .. (is_windows and ";" or ":") .. vim.env.PATH
-- Highlight on yank
vim.api.nvim_create_autocmd("TextYankPost", {
desc = "Highlight when yanking (copying) text",
group = vim.api.nvim_create_augroup("highlight-yank", { clear = true }),
callback = function()
vim.highlight.on_yank { timeout = 500 }
end,
})
-- set colorscheme
vim.cmd.colorscheme "catppuccin-mocha"