2024-02-29 17:33:20 +01:00
|
|
|
local opt = vim.opt
|
2024-03-09 13:43:19 +01:00
|
|
|
local o = vim.o
|
2024-02-29 17:33:20 +01:00
|
|
|
local g = vim.g
|
|
|
|
|
|
|
|
-------------------------------------- globals -----------------------------------------
|
|
|
|
g.toggle_theme_icon = " "
|
|
|
|
|
|
|
|
-------------------------------------- options ------------------------------------------
|
2024-03-09 13:43:19 +01:00
|
|
|
o.laststatus = 3
|
|
|
|
o.showmode = false
|
2024-02-29 17:33:20 +01:00
|
|
|
|
2024-03-09 13:43:19 +01:00
|
|
|
o.clipboard = "unnamedplus"
|
|
|
|
o.cursorline = true
|
|
|
|
o.cursorlineopt = "number"
|
2024-02-29 17:33:20 +01:00
|
|
|
|
|
|
|
-- Indenting
|
2024-03-09 13:43:19 +01:00
|
|
|
o.expandtab = true
|
|
|
|
o.shiftwidth = 2
|
|
|
|
o.smartindent = true
|
|
|
|
o.tabstop = 2
|
|
|
|
o.softtabstop = 2
|
2024-02-29 17:33:20 +01:00
|
|
|
|
|
|
|
opt.fillchars = { eob = " " }
|
2024-03-09 13:43:19 +01:00
|
|
|
o.ignorecase = true
|
|
|
|
o.smartcase = true
|
|
|
|
o.mouse = "a"
|
2024-02-29 17:33:20 +01:00
|
|
|
|
|
|
|
-- Numbers
|
2024-03-09 13:43:19 +01:00
|
|
|
o.number = true
|
|
|
|
o.numberwidth = 2
|
|
|
|
o.ruler = false
|
2024-02-29 17:33:20 +01:00
|
|
|
|
|
|
|
-- disable nvim intro
|
|
|
|
opt.shortmess:append "sI"
|
|
|
|
|
2024-03-09 13:43:19 +01:00
|
|
|
o.signcolumn = "yes"
|
|
|
|
o.splitbelow = true
|
|
|
|
o.splitright = true
|
|
|
|
o.timeoutlen = 400
|
|
|
|
o.undofile = true
|
2024-02-29 17:33:20 +01:00
|
|
|
|
|
|
|
-- interval for writing swap file to disk, also used by gitsigns
|
2024-03-09 13:43:19 +01:00
|
|
|
o.updatetime = 250
|
2024-02-29 17:33:20 +01:00
|
|
|
|
|
|
|
-- go to previous/next line with h,l,left arrow and right arrow
|
|
|
|
-- when cursor reaches end/beginning of line
|
|
|
|
opt.whichwrap:append "<>[]hl"
|
|
|
|
|
2024-03-04 03:37:10 +01:00
|
|
|
-- g.mapleader = " "
|
2024-02-29 17:33:20 +01:00
|
|
|
|
|
|
|
-- 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
|
2024-03-10 15:30:40 +01:00
|
|
|
local is_windows = vim.fn.has("win32") ~= 0
|
2024-02-29 17:33:20 +01:00
|
|
|
vim.env.PATH = vim.fn.stdpath "data" .. "/mason/bin" .. (is_windows and ";" or ":") .. vim.env.PATH
|