-- Lazy load everything! -- -- --dofile("lsp.lua") --dofile("galaxyline.lua") --dofile("nvim-tree.lua") local opt = vim.opt local g = vim.g vim.cmd [[ set nowrap set nobackup set nowritebackup set noerrorbells set noswapfile colorscheme dusk function! Preserve(command) let w = winsaveview() execute a:command call winrestview(w) endfunction autocmd FileType nix map u :call Preserve("%!update-nix-fetchgit --location=" . line(".") . ":" . col(".")) autocmd BufWinEnter NvimTree setlocal nonumber map ; : highlight IndentBlanklineChar guifg = #393b4d ]] -- Enable plugins require('bufferline').setup{} require('pears').setup() require('colorizer').setup() -- Treesitter settings require'nvim-treesitter.configs'.setup { ensure_installed = "all", -- one of "all", "maintained" (parsers with maintainers), or a list of languages highlight = { enable = true }, } local map = vim.api.nvim_set_keymap options = { noremap = true } map('n', '', ':NvimTreeToggle ', options) map('n', '', ':Telescope find_files ', options) map('n', '', ':Telescope live_grep ', options) map('n', '', ':noh ', options) map('n', '', ':!xclip -sel c -o | pygmentize -f html | xclip -sel c ', options) vim.api.nvim_set_keymap('n', '0', "getline('.')[0 : col('.') - 2] =~# '^\\s\\+$' ? '0' : '^'", {silent = true, noremap = true, expr = true}) g.mapleader = ' ' -- Indent line g.indent_blankline_char = '▏' -- Performance opt.lazyredraw = true; opt.shell = "zsh" opt.shadafile = "NONE" -- Colors opt.termguicolors = true -- Undo files opt.undofile = true -- Indentation opt.smartindent = true opt.tabstop = 4 opt.shiftwidth = 4 opt.shiftround = true opt.expandtab = true opt.scrolloff = 3 -- Set clipboard to use system clipboard opt.clipboard = "unnamedplus" -- Use mouse opt.mouse = "a" -- Nicer UI settings opt.cursorline = true opt.relativenumber = true opt.number = true -- Get rid of annoying viminfo file opt.viminfo = "" opt.viminfofile = "NONE" -- Miscellaneous quality of life opt.ignorecase = true opt.ttimeoutlen = 5 opt.compatible = false opt.hidden = true opt.shortmess = "atI"