my neovim configuration
at main 2.3 kB view raw
1-- set leader keys 2vim.keymap.set("", "<Space>", "<Nop>", opts) 3vim.g.mapleader = " " 4vim.g.maplocalleader = " " 5 6-- set termguicolors 7vim.opt.termguicolors = true 8 9-- transparent background 10vim.api.nvim_set_hl(0, "Normal", { bg = "none" }) 11vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" }) 12vim.api.nvim_set_hl(0, "FloatBorder", { bg = "none" }) 13vim.api.nvim_set_hl(0, "Pmenu", { bg = "none" }) 14vim.api.nvim_set_hl(0, "Terminal", { bg = "none" }) 15vim.api.nvim_set_hl(0, "EndOfBuffer", { bg = "none" }) 16vim.api.nvim_set_hl(0, "FoldColumn", { bg = "none" }) 17vim.api.nvim_set_hl(0, "Folded", { bg = "none" }) 18vim.api.nvim_set_hl(0, "SignColumn", { bg = "none" }) 19vim.api.nvim_set_hl(0, "NormalNC", { bg = "none" }) 20vim.api.nvim_set_hl(0, "WhichKeyFloat", { bg = "none" }) 21vim.api.nvim_set_hl(0, "TelescopeBorder", { bg = "none" }) 22vim.api.nvim_set_hl(0, "TelescopeNormal", { bg = "none" }) 23vim.api.nvim_set_hl(0, "TelescopePromptBorder", { bg = "none" }) 24vim.api.nvim_set_hl(0, "TelescopePromptTitle", { bg = "none" }) 25 26-- search options 27vim.opt.smartcase = true 28vim.opt.ignorecase = true 29vim.opt.hlsearch = true 30vim.opt.incsearch = true 31 32-- evil mouse 33vim.opt.mouse = 'a' 34 35-- better indentations 36vim.opt.autoindent = true 37vim.opt.smartindent = true 38vim.opt.breakindent = true 39 40-- tab defaults 41vim.opt.expandtab = true 42vim.opt.shiftwidth = 2 43vim.opt.softtabstop = 2 44vim.opt.tabstop = 2 45 46-- use undofile not swap/backup 47vim.opt.undofile = true 48vim.opt.swapfile = false 49vim.opt.backup = false 50vim.opt.writebackup = false 51 52-- use system clipboard 53vim.opt.clipboard = "unnamedplus" 54 55-- use more space for cmd 56vim.opt.cmdheight = 2 57 58-- cmp options 59vim.opt.completeopt = { "menuone", "noselect" } 60 61-- makes `` be visible in markdown files 62vim.opt.conceallevel = 0 63 64-- set file encoding 65vim.opt.fileencoding = "utf-8" 66 67-- don't show mode 68vim.opt.showmode = false 69 70-- always show tabs 71vim.opt.showtabline = 2 72 73-- chose split directions 74vim.opt.splitbelow = true 75vim.opt.splitright = true 76 77-- less fast timeout 78vim.opt.timeoutlen = 1000 79 80-- faster updates 81vim.opt.updatetime = 300 82 83-- numbered lines 84vim.opt.number = true 85vim.opt.relativenumber = true 86vim.opt.numberwidth = 2 87 88-- sign column 89vim.opt.signcolumn = "yes" 90 91-- no wrapping 92vim.opt.wrap = false 93 94-- make scrolling more better 95vim.opt.scrolloff = 8 96vim.opt.sidescrolloff = 8