.dotfiles/configs/nvim/lua/core/options.lua

73 lines
3.5 KiB
Lua
Raw Normal View History

2022-04-23 03:41:04 +02:00
-------------
-- General --
-------------
local set = vim.opt
2022-04-25 16:23:14 +02:00
set.swapfile = false -- Don't use swapfile
set.updatetime = 0 -- Faster completion
set.encoding = "utf-8" -- The encoding displayed
set.fileencoding = "utf-8" -- The encoding written to file
set.smartindent = true -- Makes indenting smart
set.iskeyword:append("-") -- treat dash separated words as a word text object"
set.clipboard = "unnamedplus" -- Copy paste between vim and everything else
set.smarttab = true -- Makes tabbing smarter will realize you have 2 vs 4
set.expandtab = true -- Converts tabs to spaces
set.autoindent = true -- Good auto indent
2022-05-03 19:28:52 +02:00
set.autochdir = false -- Your working directory will always be the same as your working directory
2022-04-25 16:23:14 +02:00
set.incsearch = true -- sets incremental search
set.shell = "/bin/zsh" -- Set your shell to bash or zsh
2022-08-23 14:58:15 +02:00
set.shortmess:append("sI") -- Disable nvim intro
vim.cmd([[set nobackup]]) -- creates a backup file
vim.cmd([[set nowritebackup]]) -- creates a backup file i guess
vim.cmd([[set formatoptions-=cro]]) -- Stop newline continution of comments
vim.cmd([[set complete+=kspell]]) -- auto complete with spellcheck
vim.cmd([[set completeopt=menuone,longest]]) -- auto complete menu (It's pretty great)
vim.cmd([[set nocompatible]]) -- Disable compatibility to old-time vi
set.mouse = "a" -- Enable mouse support
2022-06-20 19:57:01 +02:00
set.foldmethod = "expr"
set.foldexpr = "nvim_treesitter#foldexpr()" -- use treesitter for folding
vim.wo.foldlevel = 99 -- feel free to decrease the value
vim.wo.foldenable = true
2022-04-23 03:41:04 +02:00
---------------
-- Neovim UI --
---------------
2022-04-25 16:23:14 +02:00
set.pumheight = 15 -- Makes popup menu smaller
set.ruler = true -- Show the cursor position all the time
set.splitbelow = true -- Horizontal splits will automatically be below
set.splitright = true -- Vertical splits will automatically be to the right
set.conceallevel = 0 -- So that I can see `` in markdown files
set.tabstop = 2 -- Insert 2 spaces for a tab
set.number = true -- Line numbers
set.background = "dark" -- tell vim what the background color looks like
set.virtualedit = "onemore" -- With This option you can move the cursor one character over the end
set.ignorecase = true -- ignores case when searching
set.smartcase = true -- turns on case sensitive search when letters are capitalized
set.termguicolors = true -- set term gui colors (most terminals support this)
2022-05-13 19:19:05 +02:00
set.laststatus = 3 -- Always display the status line
2022-04-25 16:23:14 +02:00
set.title = true -- Show current txt that you editing
set.relativenumber = false -- Vims absolute, relative and hybrid line numbers
set.cursorline = false -- Enable highlighting of the current line
2022-09-02 16:15:54 +02:00
set.synmaxcol = 128
vim.cmd("syntax sync minlines=256")
set.mousescroll = "ver:1,hor:1"
2022-04-25 16:23:14 +02:00
set.shiftwidth = 2 -- Change the number of space characters inserted for indentation
set.showtabline = 1 -- Always show tabs
set.cmdheight = 1 -- More space for displaying messages
2022-08-23 14:58:15 +02:00
vim.cmd([[set nowrap]]) -- Display long lines as just one line
vim.cmd([[set noshowmode]]) -- We don't need to see things like -- INSERT -- anymore
vim.cmd([[syntax enable]]) -- Enables syntax highlighing
vim.cmd([[set t_Co=256]]) -- Support 256 colors
2022-04-23 03:41:04 +02:00
-- vim.cmd "set whichwrap+=<,>,[,],h,l" -- Breaks Space-Time Continuum
2022-08-23 14:58:15 +02:00
vim.diagnostic.config({
virtual_text = false,
})
2022-04-23 03:41:04 +02:00
-----------------
-- Memory, CPU --
-----------------
2022-04-25 16:23:14 +02:00
set.hidden = true -- Required to keep multiple buffers open multiple buffers
set.timeoutlen = 500 -- By default timeoutlen is 1000 ms
set.lazyredraw = true -- Disable lazyredraw
set.synmaxcol = 240 -- Max column for syntax highlight
set.updatetime = 700 -- ms to wait for trigger an event