--┌──────┐ --│ │ --│ Plug │ --│ │ --└──────┘ local Plug = vim.fn['plug#'] vim.call('plug#begin') --Plug('ellisonleao/gruvbox.nvim') Plug('nvim-treesitter/nvim-treesitter') --Plug('stevearc/oil.nvim') Plug('godlygeek/tabular') Plug('jbyuki/venn.nvim') --Plug('ribru17/bamboo.nvim') Plug('sphamba/smear-cursor.nvim') Plug('savq/melange-nvim') --Plug('smoka7/hop.nvim') --Plug('MeanderingProgrammer/render-markdown.nvim') --Plug('sainnhe/sonokai') --Plug('sainnhe/everforest') --Plug('shaunsingh/nord.nvim') --Plug('sainnhe/gruvbox-material') --Plug('rebelot/kanagawa.nvim') --Plug('hat0uma/csvview.nvim') --Plug('catppuccin/nvim') --Plug('jbyuki/carrot.nvim') -- evaluates lua code in markdown files Plug('habamax/vim-asciidoctor') Plug('folke/which-key.nvim') vim.call('plug#end') --┌──────────────┐ --│ │ --│ Line Numbers │ --│ │ --└──────────────┘ vim.opt.number = true vim.opt.relativenumber = true vim.opt.numberwidth = 4 vim.opt.wrap = true vim.opt.breakindent = true --┌────────┐ --│ │ --│ Cursor │ --│ │ --└────────┘ -- vim.opt.guicursor = "n-v-c-sm:block,i-ci-ve:ver25,r-cr-o:hor20,t:block-blinkon500-blinkoff500-TermCursor" --vim.opt.guicursor = "n-v-c-sm:block-blinkon1800-blinkoff200,i-ci-ve:ver25-blinkon1800-blinkoff200,r-cr-o:hor20,t:block-blinkon1000-blinkoff1000-TermCursor" --┌─────────────┐ --│ │ --│ Indentation │ --│ │ --└─────────────┘ vim.opt.tabstop = 2 vim.opt.shiftwidth = 2 vim.opt.expandtab = true vim.opt.autoindent = true --┌────────┐ --│ │ --│ Search │ --│ │ --└────────┘ vim.opt.ignorecase = true vim.opt.smartcase = true vim.opt.hlsearch = false vim.opt.incsearch = true --┌────────┐ --│ │ --│ Visual │ --│ │ --└────────┘ vim.opt.cursorline = false vim.opt.cursorcolumn = false --┌──────────┐ --│ │ --│ Behavior │ --│ │ --└──────────┘ vim.opt.scrolloff = 5 vim.opt.sidescrolloff = 10 vim.opt.iskeyword:append("-") vim.opt.path:append("**") vim.opt.autochdir = true vim.opt.mouse = "" vim.opt.splitbelow = true vim.opt.splitright = true --┌─────────────┐ --│ │ --│ Keybindings │ --│ │ --└─────────────┘ vim.g.mapleader = " " vim.g.maplocalleader = " " vim.keymap.set({"n" , "v"} , "'" , ":e ." , { desc = "OPEN THE CURRENT BUFFER'S DIRECTORY" }) --vim.keymap.set({"n" , "v"} , "" , ":HopWord" , { desc = "HOP TO WORDS" }) vim.keymap.set({"n" , "v"} , "C" , ":put =execute('lua =" , { desc = "QUICK LUA CALCULATION AND INSERT" }) vim.keymap.set({"n" , "v"} , "E" , ":set ve=none" , { desc = "DISABLE VISUAL EDIT MODE" }) vim.keymap.set({"n" , "v"} , "b" , "ly$h%p" , { desc = "COPY CONTEXT COMMENT TO OTHER END OF SCOPE" }) vim.keymap.set({"n" , "v"} , "c" , ":lua =" , { desc = "QUICK LUA CALCULATION" }) vim.keymap.set({"n" , "v"} , "d" , ":put =strftime('%Y-%m-%d-%H:%M:%S') :normal I[A]kJ" , { desc = "APPEND TIMESTAMP TO LINE" }) vim.keymap.set({"n" , "v"} , "e" , ":set ve=all" , { desc = "ENABLE VISUAL EDIT MODE" }) vim.keymap.set({"n" , "v"} , "o" , ":buffer" , { desc = "BUFFER MENU" }) vim.keymap.set({"n" , "v"} , "p" , "\"*p" , { desc = "PASTE FROM CLIPBOARD" }) vim.keymap.set({"n" , "v"} , "te" , ":Tabularize /=" , { desc = "FORMAT MARKDOWN TABLES" }) vim.keymap.set({"n" , "v"} , "tt" , ":Tabularize /|/l0" , { desc = "FORMAT MARKDOWN TABLES" }) vim.keymap.set({"n" , "v"} , "v" , ":VBoxO" , { desc = "DISABLE VISUAL EDIT MODE" }) vim.keymap.set({"n" , "v"} , "w" , "" , { desc = "SWITCH WINDOW" }) vim.keymap.set({"n" , "v"} , "x" , ":%s/ \\+$//" , { desc = "REMOVE ALL TRAILING SPACES" }) vim.keymap.set({"n" , "v"} , "y" , "\"+y" , { desc = "YANK TO CLIPBOARD" }) --┌───────────┐ --│ │ --│ Clipboard │ --│ │ --└───────────┘ vim.opt.clipboard:append("unnamedplus") --┌─────┐ --│ │ --│ Oil │ --│ │ --└─────┘ --require("oil").setup({ -- default_file_explorer = true --}) --┌────────────┐ --│ │ --│ Treesitter │ --│ │ --└────────────┘ require'nvim-treesitter.configs'.setup { -- A list of parser names, or "all" (the listed parsers MUST always be installed) ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "markdown", "markdown_inline", "javascript", "html", "nginx", "bash", "cmake"}, -- Install parsers synchronously (only applied to `ensure_installed`) sync_install = false, -- Automatically install missing parsers when entering buffer -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally auto_install = false, -- List of parsers to ignore installing (or "all") --ignore_install = { "javascript" }, ---- If you need to change the installation directory of the parsers (see -> Advanced Setup) -- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")! highlight = { enable = true, -- NOTE: these are the names of the parsers and not the filetype. (for example if you want to -- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is -- the name of the parser) -- list of language that will be disabled --disable = { "c", "rust" }, -- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files disable = function(lang, buf) local max_filesize = 100 * 1024 -- 100 KB local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf)) if ok and stats and stats.size > max_filesize then return true end end, -- Setting this to true will run `:h syntax` and tree-sitter at the same time. -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). -- Using this option may slow down your editor, and you may see some duplicate highlights. -- Instead of true it can also be a list of languages additional_vim_regex_highlighting = false, }, } --┌──────────────┐ --│ │ --│ Smear Cursor │ --│ │ --└──────────────┘ require('smear_cursor').enabled = true --┌─────────────────┐ --│ │ --│ Render Markdown │ --│ │ --└─────────────────┘ --require('render-markdown').setup({ -- sign = { enabled = flase }, -- anti_conceal = { -- enabled = false, -- above = 0, -- below = 0, -- }, -- heading = { -- sign = false, -- icons = { '# ' }, -- width = 'block', -- --left_margin = 0.5, -- --left_pad = 2, -- right_pad = 2, -- --position = 'inline', -- }, -- bullet = { -- icons = { '-' }, -- }, -- link = { -- image = '@', -- email = '@', -- hyperlink = '@', -- }, -- checkbox = { -- bullet = false, -- unchecked = { icon = 'O', }, -- checked = { icon = 'X', }, -- }, -- indent = { enabled = true, }, -- latex = { enabled = true, }, --}) -- --┌─────┐ -- --│ │ -- --│ Hop │ -- --│ │ -- --└─────┘ -- require('hop').setup{ -- keys = 'abdefghijklmnorstuvwy', -- } --┌──────────────┐ --│ │ --│ Visual Stuff │ --│ │ --└──────────────┘ -- require("bamboo").load() vim.cmd(":colorscheme melange") vim.cmd [[ highlight Normal guibg=none highlight NonText guibg=none highlight Normal ctermbg=none highlight NonText ctermbg=none ]] --vim.opt.guifont = 'hermit' --vim.g.neovide_opacity = 0.8 --vim.g.neovide_normal_opacity = 0.8 --┌──────────┐ --│ │ --│ CSV View │ --│ │ --└──────────┘ -- require('csvview').setup() --┌───────────────┐ --│ │ --│ Markdown Eval │ --│ │ --└───────────────┘ --require 'mdeval'.setup() --┌───────────┐ --│ │ --│ Home Page │ --│ │ --└───────────┘ --vim.cmd(":edit ~/scratch.md")