mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
breaking: Remove setup script and use chezmoi
This commit is contained in:
parent
02bbb24cac
commit
0051a163c3
190 changed files with 118 additions and 3456 deletions
86
dot_config/nvim/lua/config/options.lua
Normal file
86
dot_config/nvim/lua/config/options.lua
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
-- <leader> is space
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = "\\"
|
||||
-- Disable netrw (file explorer) use NvimTree instead
|
||||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
-- Disable Perl
|
||||
vim.g.loaded_perl_provider = 0 -- Don't load Perl
|
||||
|
||||
-- Format on save
|
||||
vim.g.autoformat = true
|
||||
|
||||
local opt = vim.opt
|
||||
|
||||
-- Clipboard
|
||||
-- `unnamedplus` for system clipboard
|
||||
opt.clipboard = vim.env.SSH_TTY and "" or "unnamedplus"
|
||||
-- Line number
|
||||
opt.number = true
|
||||
opt.relativenumber = true
|
||||
|
||||
-- Confirm before dangerous operations
|
||||
opt.confirm = true
|
||||
|
||||
-- Word wrap
|
||||
opt.linebreak = true
|
||||
|
||||
-- Indentation
|
||||
opt.expandtab = true
|
||||
opt.shiftwidth = 4
|
||||
opt.tabstop = 4
|
||||
opt.shiftround = true
|
||||
|
||||
-- Case
|
||||
opt.ignorecase = true
|
||||
opt.smartcase = true
|
||||
|
||||
-- Highlight current line
|
||||
opt.cursorline = true
|
||||
-- opt.cursorcolumn = true -- Highlight current column
|
||||
-- Terminal GUI
|
||||
opt.termguicolors = true
|
||||
|
||||
--- Fold
|
||||
opt.foldmethod = "expr"
|
||||
-- Folding provided by treesitter
|
||||
opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
-- Disable fold at start
|
||||
opt.foldlevelstart = 99
|
||||
opt.foldlevel = 99
|
||||
opt.foldenable = false
|
||||
opt.foldlevelstart = 1
|
||||
|
||||
-- Hide Command Line if empty
|
||||
opt.cmdheight = 0
|
||||
|
||||
-- Scroll
|
||||
opt.scrolloff = 5 -- Always show 5 lines above/below cursor
|
||||
opt.sidescrolloff = 10 -- Always show 10 columns left/right of cursor
|
||||
|
||||
-- Conceal: Hide some characters, might be useful for markdown and LaTeX
|
||||
opt.conceallevel = 2
|
||||
|
||||
-- `laststatus`
|
||||
-- Disable status line: Use `lualine` instead
|
||||
-- opt.laststatus = 0
|
||||
-- 3: Global status line (always at the bottom)
|
||||
opt.laststatus = 3
|
||||
|
||||
vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
|
||||
-- hover.nvim
|
||||
vim.o.mousemoveevent = true
|
||||
|
||||
-- Hide zero-width space
|
||||
-- vim.api.nvim_create_autocmd("FileType", {
|
||||
-- pattern = "*",
|
||||
-- callback = function()
|
||||
-- vim.opt_local.conceallevel = 2
|
||||
-- vim.cmd([[
|
||||
-- syntax match ZeroWidthSpace /\%u200b/ conceal
|
||||
-- highlight link ZeroWidthSpace Conceal
|
||||
-- ]])
|
||||
-- end,
|
||||
-- })
|
||||
|
||||
vim.fn.matchadd("Conceal", [[\%u200b]], 10, -1, { conceal = "" })
|
||||
Loading…
Add table
Add a link
Reference in a new issue