66 lines
1.3 KiB
Lua
66 lines
1.3 KiB
Lua
-- lua configuratiuon file for neovim
|
|
|
|
local opt = vim.opt
|
|
local g = vim.g
|
|
|
|
opt.clipboard = "unnamedplus"
|
|
opt.cursorline = true
|
|
opt.showmode = false
|
|
opt.laststatus = 3
|
|
|
|
-- Indenting
|
|
opt.expandtab = true
|
|
opt.shiftwidth = 2
|
|
opt.smartindent = true
|
|
opt.tabstop = 2
|
|
opt.softtabstop = 2
|
|
|
|
opt.fillchars = { eob = " " }
|
|
opt.ignorecase = true
|
|
opt.smartcase = true
|
|
opt.mouse = "a"
|
|
opt.mousemoveevent = true
|
|
|
|
-- Numbers
|
|
opt.number = true
|
|
opt.numberwidth = 2
|
|
opt.ruler = false
|
|
|
|
opt.signcolumn = "yes"
|
|
opt.splitbelow = true
|
|
opt.splitright = true
|
|
opt.termguicolors = true
|
|
opt.timeoutlen = 300
|
|
opt.undofile = true
|
|
|
|
|
|
g.mapleader = ","
|
|
-- opt.fillchars = { eob = "~" }
|
|
opt.scrolloff = 4
|
|
opt.spelllang = "fr"
|
|
opt.colorcolumn = { 100 }
|
|
opt.textwidth = 100
|
|
opt.timeoutlen = 1000
|
|
opt.breakindent = true
|
|
|
|
opt.foldmethod = "expr"
|
|
opt.foldlevelstart = 99
|
|
opt.foldexpr = 'nvim_treesitter#foldexpr()'
|
|
opt.sessionoptions = 'blank,buffers,curdir,help,tabpages,winsize,terminal'
|
|
|
|
require("bootstrap")
|
|
|
|
local plugins = require("plugins")
|
|
require("lazy").setup(plugins)
|
|
|
|
vim.cmd.colorscheme "catppuccin"
|
|
|
|
-- if $XDG_STATE_HOME/darkmode exists, set dark background, light other wise
|
|
local path = (vim.fn.getenv("XDG_STATE_HOME") or "~/.local/state") .. "/darkmode"
|
|
if vim.fn.filereadable(path) == 1 then
|
|
opt.background = "dark"
|
|
else
|
|
opt.background = "light"
|
|
end
|
|
|
|
require("mappings")
|