-- General Neovim settings and configuration ----------------------------------------------------------- ----------------------------------------------------------- -- Neovim API aliases ----------------------------------------------------------- local fn = vim.fn -- Call Vim functions local cmd = vim.cmd -- Execute Vim commands local exec = vim.api.nvim_exec -- Execute Vimscript local g = vim.g -- Global variables local opt = vim.opt -- Set options (global/buffer/windows-scoped) ----------------------------------------------------------- -- General ----------------------------------------------------------- g.mapleader = ',' -- Change leader to a comma opt.mouse = 'a' -- Enable mouse support opt.clipboard = 'unnamedplus' -- Copy/paste to system clipboard opt.swapfile = false -- Don't use swapfile opt.shadafile = "NONE" opt.shadafile = "" opt.shell = "/bin/bash" opt.updatetime = 200 opt.cursorline = true ----------------------------------------------------------- -- Neovim UI ----------------------------------------------------------- opt.number = true -- Show line number opt.showmatch = true -- Highlight matching parenthesis opt.foldmethod = 'marker' -- Enable folding (default 'foldmarker') --opt.colorcolumn = '150' -- Line lenght marker at 80 columns opt.splitright = true -- Vertical split to the right opt.splitbelow = true -- Orizontal split to the bottom opt.ignorecase = true -- Ignore case letters when search opt.smartcase = true -- Ignore lowercase for the whole pattern opt.linebreak = true -- Wrap on word boundary ----------------------------------------------------------- -- Memory, CPU ----------------------------------------------------------- opt.hidden = true -- Enable background buffers opt.history = 100 -- Remember N lines in history opt.lazyredraw = true -- Faster scrolling opt.synmaxcol = 240 -- Max column for syntax highlight ----------------------------------------------------------- -- Colorscheme ----------------------------------------------------------- opt.termguicolors = true -- Enable 24-bit RGB colors cmd [[colorscheme tokyonight]] ----------------------------------------------------------- -- Tabs, indent ----------------------------------------------------------- opt.expandtab = true -- Use spaces instead of tabs opt.shiftwidth = 4 -- Shift 4 spaces when tab opt.tabstop = 4 -- 1 tab == 4 spaces opt.smartindent = true -- Autoindent new lines -- 2 spaces for selected filetypes cmd [[ autocmd FileType liquid,xml,html,xhtml,css,scss,javascript,lua,yaml setlocal shiftwidth=2 tabstop=2 ]] local disabled_built_ins = { "netrw", "netrwPlugin", "netrwSettings", "netrwFileHandlers", "gzip", "zip", "zipPlugin", "tar", "tarPlugin", "getscript", "getscriptPlugin", "vimball", "vimballPlugin", "2html_plugin", "logipat", "rrhelper", "spellfile_plugin", "matchit" } for _, plugin in pairs(disabled_built_ins) do vim.g["loaded_" .. plugin] = 1 end