Void Linux workstation powered by niri, Fish and NeoVim. Contains scripts, browser extensions, custom XBPS packages, and typst plugins. git.anhgelus.world/anhgelus/dotfiles
void niri fish neovim nvim vim dotfiles linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(config): nvim

+291
+3
config/nvim/init.lua
··· 1 + require('options') 2 + require('plugin') 3 + require('colorscheme')
+118
config/nvim/init.vim.bp
··· 1 + set nocompatible " be iMproved, required 2 + filetype off " required 3 + 4 + syntax on 5 + 6 + " set the runtime path to include Vundle and initialize 7 + set rtp+=~/.vim/bundle/Vundle.vim 8 + call vundle#begin() 9 + 10 + " let Vundle manage Vundle, required 11 + Plugin 'VundleVim/Vundle.vim' 12 + 13 + " Plugins 14 + Plugin 'godlygeek/tabular' 15 + " Plugin 'preservim/vim-markdown' 16 + Plugin 'vim-pandoc/vim-pandoc' 17 + Plugin 'vim-pandoc/vim-pandoc-syntax' 18 + Plugin 'WolfgangMehner/latex-support' 19 + Plugin 'http://github.com/tpope/vim-surround' " Surrounding ysw) 20 + Plugin 'https://github.com/preservim/nerdtree' " NerdTree 21 + Plugin 'https://github.com/tpope/vim-commentary' " For Commenting gcc & gc 22 + Plugin 'https://github.com/vim-airline/vim-airline' " Status bar 23 + Plugin 'https://github.com/ap/vim-css-color' " CSS Color Preview 24 + Plugin 'https://github.com/rafi/awesome-vim-colorschemes' " Retro Scheme 25 + Plugin 'https://github.com/ryanoasis/vim-devicons' " Developer Icons 26 + Plugin 'https://github.com/tc50cal/vim-terminal' " Vim Terminal 27 + Plugin 'https://github.com/preservim/tagbar' " Tagbar for code navigation 28 + Plugin 'https://github.com/neoclide/coc.nvim' " Autocompletions 29 + " Plugin 'https://github.com/terryma/vim-multiple-cursors' " CTRL + N for multiple cursors 30 + Plugin 'https://github.com/mattn/emmet-vim' " Emmet support 31 + Plugin 'rubixninja314/vim-mcfunction' " mcfunction 32 + " Plugin 'sirver/ultisnips' 33 + " let g:UltiSnipsExpandTrigger = '<tab>' 34 + " let g:UltiSnipsJumpForwardTrigger = '<tab>' 35 + " let g:UltiSnipsJumpBackwardTrigger = '<s-tab>' 36 + "Plugin 'lervag/vimtex' 37 + " let g:tex_flavor='latex' 38 + " let g:vimtex_view_method='zathura' 39 + " let g:vimtex_quickfix_mode=0 40 + " set conceallevel=1 41 + " let g:tex_conceal='abdmg' 42 + Plugin 'catppuccin/vim' " theme 43 + Plugin 'vimpostor/vim-prism' " theme 44 + Plugin 'elixir-editors/vim-elixir' " elixir 45 + Plugin 'mhinz/vim-mix-format' " elixir format 46 + Plugin 'neovim/nvim-lspconfig' " elixir language server 47 + 48 + call vundle#end() " required 49 + filetype plugin indent on " required 50 + 51 + :colorscheme prism 52 + 53 + :set number relativenumber 54 + :set autoindent 55 + :set tabstop=4 56 + :set shiftwidth=4 57 + :set smarttab 58 + :set softtabstop=4 59 + :set mouse=a 60 + 61 + nnoremap <C-Left> :tabprevious<CR> 62 + nnoremap <C-Right> :tabnext<CR> 63 + nnoremap <C-j> :tabprevious<CR> 64 + nnoremap <C-k> :tabnext<CR> 65 + nnoremap <C-q> :tabclose<CR> 66 + 67 + nnoremap <C-f> :NERDTreeFocus<CR> 68 + nnoremap <C-n> :NERDTree<CR> 69 + nnoremap <C-t> :NERDTreeToggle<CR> 70 + 71 + nmap <F8> :TagbarToggle<CR> 72 + 73 + :set completeopt-=preview " For No Previews 74 + 75 + let g:NERDTreeDirArrowExpandable="+" 76 + let g:NERDTreeDirArrowCollapsible="~" 77 + 78 + let g:airline_powerline_fonts = 1 79 + 80 + if !exists('g:airline_symbols') 81 + let g:airline_symbols = {} 82 + endif 83 + 84 + " airline symbols 85 + let g:airline_left_sep = '' 86 + let g:airline_left_alt_sep = '' 87 + let g:airline_right_sep = '' 88 + let g:airline_right_alt_sep = '' 89 + let g:airline_symbols.branch = '' 90 + let g:airline_symbols.readonly = '' 91 + let g:airline_symbols.linenr = '' 92 + 93 + " Custom Commands 94 + "" LateX 95 + :command Ttp !pdflatex %:t 96 + 97 + "" JS/TS/Node 98 + :command NpmInstall !npm install 99 + :command TscWatch !npm run ts-watch 100 + :command NodemonStart !npm run start 101 + 102 + "" Git 103 + :command -nargs=1 -bar GitignoreCreate !curl https://www.toptal.com/developers/gitignore/api/<args> | tee -a .gitignore 104 + :command -nargs=* GitCommit !git commit -m "<args>" 105 + :command -nargs=* GitCommitAll !git commit -am "<args>" 106 + :command GitAddAll !git add * && git add .* 107 + :command GitStatus !git status 108 + :command GitPush !git push 109 + 110 + inoremap <expr> <Tab> pumvisible() ? coc#_select_confirm() : "<Tab>" 111 + 112 + set shell=/bin/bash 113 + 114 + " Highlight 115 + augroup twig_ft 116 + au! 117 + autocmd BufNewFile,BufRead *.mcfunction set syntax=mcfunction 118 + augroup END
+11
config/nvim/lazy-lock.json
··· 1 + { 2 + "blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" }, 3 + "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, 4 + "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, 5 + "mason-lspconfig.nvim": { "branch": "main", "commit": "7f0bf635082bb9b7d2b37766054526a6ccafdb85" }, 6 + "mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" }, 7 + "monokai.nvim": { "branch": "master", "commit": "b8bd44d5796503173627d7a1fc51f77ec3a08a63" }, 8 + "nvim-lspconfig": { "branch": "master", "commit": "f0c6ccf43997a1c7e9ec4aea36ffbf2ddd9f15ef" }, 9 + "vim-elixir": { "branch": "master", "commit": "6dff29176eb35e025bc94b262bf6d4e517e11f7d" }, 10 + "vim-mix-format": { "branch": "master", "commit": "01a31ef82aa52697d589574da50723980eeae456" } 11 + }
+7
config/nvim/lua/colorscheme.lua
··· 1 + local colorscheme = 'monokai_pro' 2 + 3 + local is_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme) 4 + if not is_ok then 5 + vim.notify('colorscheme ' .. colorscheme .. ' not found!') 6 + return 7 + end
+22
config/nvim/lua/options.lua
··· 1 + vim.opt.completeopt = {'menu', 'menuone', 'noselect'} 2 + 3 + vim.opt.tabstop = 4 -- number of visual spaces per TAB 4 + vim.opt.softtabstop = 4 -- number of spacesin tab when editing 5 + vim.opt.shiftwidth = 4 -- insert 4 spaces on a tab 6 + vim.opt.expandtab = true -- tabs are spaces, mainly because of python 7 + 8 + vim.opt.number = true -- show absolute number 9 + vim.opt.relativenumber = true -- add numbers to each line on the left side 10 + vim.opt.cursorline = true -- highlight cursor line underneath the cursor horizontally 11 + vim.opt.splitbelow = true -- open new vertical split bottom 12 + vim.opt.splitright = true -- open new horizontal splits right 13 + 14 + vim.opt.incsearch = true -- search as characters are entered 15 + vim.opt.ignorecase = true -- ignore case in searches by default 16 + vim.opt.smartcase = true -- but make it case sensitive if an uppercase is entered 17 + 18 + vim.filetype.add({ 19 + extension = { 20 + heex = 'eelixir' 21 + } 22 + })
+18
config/nvim/lua/plugin.lua
··· 1 + local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" 2 + if not (vim.uv or vim.loop).fs_stat(lazypath) then 3 + vim.fn.system({ 4 + "git", 5 + "clone", 6 + "--filter=blob:none", 7 + "https://github.com/folke/lazy.nvim.git", 8 + "--branch=stable", -- latest stable release 9 + lazypath, 10 + }) 11 + end 12 + vim.opt.rtp:prepend(lazypath) 13 + 14 + -- This is also a good place to setup other settings (vim.opt) 15 + vim.g.mapleader = " " 16 + vim.g.maplocalleader = "\\" 17 + 18 + require("lazy").setup("plugins")
+84
config/nvim/lua/plugins/blink.lua
··· 1 + return { 2 + { 3 + "saghen/blink.cmp", 4 + -- optional: provides snippets for the snippet source 5 + dependencies = { "rafamadriz/friendly-snippets" }, 6 + 7 + -- Use a release tag to download pre-built binaries 8 + version = "*", 9 + -- AND/OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust 10 + -- build = 'cargo build --release', 11 + -- If you use nix, you can build from source using the latest nightly rust with: 12 + -- build = 'nix run .#build-plugin', 13 + 14 + opts = { 15 + -- 'default' (recommended) for mappings similar to built-in completions (C-y to accept) 16 + -- 'super-tab' for mappings similar to VSCode (tab to accept) 17 + -- 'enter' for enter to accept 18 + -- 'none' for no mappings 19 + -- 20 + -- All presets have the following mappings: 21 + -- C-space: Open menu or open docs if already open 22 + -- C-n/C-p or Up/Down: Select next/previous item 23 + -- C-e: Hide menu 24 + -- C-k: Toggle signature help (if signature.enabled = true) 25 + -- 26 + -- See :h blink-cmp-config-keymap for defining your own keymap 27 + keymap = { 28 + -- Each keymap may be a list of commands and/or functions 29 + preset = "enter", 30 + -- Select completions 31 + ["<Up>"] = { "select_prev", "fallback" }, 32 + ["<Down>"] = { "select_next", "fallback" }, 33 + ["<Tab>"] = { "select_next", "fallback" }, 34 + ["<S-Tab>"] = { "select_prev", "fallback" }, 35 + -- Scroll documentation 36 + ["<C-b>"] = { "scroll_documentation_up", "fallback" }, 37 + ["<C-f>"] = { "scroll_documentation_down", "fallback" }, 38 + -- Show/hide signature 39 + ["<C-k>"] = { "show_signature", "hide_signature", "fallback" }, 40 + }, 41 + 42 + appearance = { 43 + -- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font' 44 + -- Adjusts spacing to ensure icons are aligned 45 + nerd_font_variant = "mono", 46 + }, 47 + 48 + sources = { 49 + -- `lsp`, `buffer`, `snippets`, `path`, and `omni` are built-in 50 + -- so you don't need to define them in `sources.providers` 51 + default = { "lsp", "path", "snippets", "buffer" }, 52 + 53 + -- Sources are configured via the sources.providers table 54 + }, 55 + 56 + -- (Default) Rust fuzzy matcher for typo resistance and significantly better performance 57 + -- You may use a lua implementation instead by using `implementation = "lua"` or fallback to the lua implementation, 58 + -- when the Rust fuzzy matcher is not available, by using `implementation = "prefer_rust"` 59 + -- 60 + -- See the fuzzy documentation for more information 61 + fuzzy = { implementation = "prefer_rust_with_warning" }, 62 + completion = { 63 + -- The keyword should only match against the text before 64 + keyword = { range = "prefix" }, 65 + menu = { 66 + -- Use treesitter to highlight the label text for the given list of sources 67 + draw = { 68 + treesitter = { "lsp" }, 69 + }, 70 + }, 71 + -- Show completions after typing a trigger character, defined by the source 72 + trigger = { show_on_trigger_character = true }, 73 + documentation = { 74 + -- Show documentation automatically 75 + auto_show = true, 76 + }, 77 + }, 78 + 79 + -- Signature help when tying 80 + signature = { enabled = true }, 81 + }, 82 + opts_extend = { "sources.default" }, 83 + } 84 + }
+3
config/nvim/lua/plugins/colorscheme.lua
··· 1 + return { 2 + "tanvirtin/monokai.nvim" 3 + }
+4
config/nvim/lua/plugins/elixir.lua
··· 1 + return { 2 + "elixir-editors/vim-elixir", 3 + "mhinz/vim-mix-format" 4 + }
+21
config/nvim/lua/plugins/lsp.lua
··· 1 + return { 2 + { 3 + "neovim/nvim-lspconfig", 4 + config = function() 5 + local lspconfig = require("lspconfig") 6 + 7 + lspconfig.pylsp.setup({}) 8 + end, 9 + }, 10 + { "mason-org/mason.nvim", opts = {} }, 11 + { 12 + "mason-org/mason-lspconfig.nvim", 13 + dependencies = { 14 + "mason-org/mason.nvim", 15 + "neovim/nvim-lspconfig", 16 + }, 17 + opts = { 18 + ensure_installed = { "pylsp", "elixirls" }, 19 + }, 20 + }, 21 + }