├── .github └── workflows │ └── stylua.yml ├── .gitignore ├── .luacheckrc ├── LICENSE ├── README.md ├── ftplugin ├── css.lua ├── html.lua ├── javascript.lua ├── lua.lua ├── markdown.lua ├── norg.lua └── text.lua ├── index.norg ├── init.lua ├── lua └── tarun │ ├── configs │ ├── alpha.lua │ ├── autopairs.lua │ ├── autosave.lua │ ├── bufferline.lua │ ├── cmp.lua │ ├── colorizer.lua │ ├── comment.lua │ ├── copilot.lua │ ├── cursorline.lua │ ├── duckytype.lua │ ├── feline.lua │ ├── gitsigns.lua │ ├── indentline.lua │ ├── neorg.lua │ ├── nvim_tree.lua │ ├── telescope.lua │ ├── themer.lua │ ├── treesitter.lua │ ├── whichkey.lua │ └── zone.lua │ ├── core │ ├── autocmds.lua │ ├── functions.lua │ ├── keymaps.lua │ ├── plugins.lua │ └── settings.lua │ └── lsp │ ├── init.lua │ ├── lspkind.lua │ ├── null-ls.lua │ └── trouble.lua ├── queries ├── javascript │ └── highlights.scm ├── lua │ └── highlights.scm ├── norg │ └── folds.scm └── rust │ └── highlights.scm ├── spell ├── en.utf-8.add └── en.utf-8.add.spl ├── startup.sh └── stylua.toml /.github/workflows/stylua.yml: -------------------------------------------------------------------------------- 1 | name: Formatting 2 | 3 | on: [push, pull_request_target] 4 | 5 | jobs: 6 | format-with-stylua: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v2 10 | - uses: JohnnyMorganz/stylua-action@1.0.0 11 | with: 12 | token: ${{ secrets.GITHUB_TOKEN }} 13 | args: . 14 | - uses: stefanzweifel/git-auto-commit-action@v4 15 | with: 16 | commit_message: "chore: autoformat with stylua" 17 | branch: ${{ github.head_ref }} 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | plugin/ 2 | -------------------------------------------------------------------------------- /.luacheckrc: -------------------------------------------------------------------------------- 1 | -- Global objects 2 | globals = { 3 | "vim", 4 | "PACKER_BOOTSTRAP", 5 | } 6 | 7 | ignore = { 8 | "631", -- max_line_length 9 | } 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 TarunDaCoder 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # My config for neovim 2 | 3 | ### THIS IS VERY OUT OF DATE 4 | ### My current neovim config is in [AlphaNvim](https://github.com/TarunDaCoder/AlphaNvim) 5 | #### Always WIP ¯\\\_(ツ)_/¯ 6 | ##### Not really that bloat, not really that blazing 7 | -------------------------------------------------------------------------------- /ftplugin/css.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TarunDaCoder/BobVim/207313a2f81703b971567e004dcb7bdfa3dd7d73/ftplugin/css.lua -------------------------------------------------------------------------------- /ftplugin/html.lua: -------------------------------------------------------------------------------- 1 | vim.wo.spell = true 2 | vim.bo.spelllang = 'en_us' 3 | -------------------------------------------------------------------------------- /ftplugin/javascript.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TarunDaCoder/BobVim/207313a2f81703b971567e004dcb7bdfa3dd7d73/ftplugin/javascript.lua -------------------------------------------------------------------------------- /ftplugin/lua.lua: -------------------------------------------------------------------------------- 1 | vim.bo.shiftwidth = 2 2 | vim.bo.tabstop = 2 3 | -------------------------------------------------------------------------------- /ftplugin/markdown.lua: -------------------------------------------------------------------------------- 1 | vim.wo.spell = true 2 | vim.bo.spelllang = 'en_us' 3 | -------------------------------------------------------------------------------- /ftplugin/norg.lua: -------------------------------------------------------------------------------- 1 | vim.bo.shiftwidth = 4 2 | vim.bo.commentstring = '#%s' 3 | vim.wo.spell = true 4 | vim.bo.spelllang = 'en_us' 5 | 6 | vim.cmd([[hi link NeorgMarkupVerbatim Comment]]) 7 | -------------------------------------------------------------------------------- /ftplugin/text.lua: -------------------------------------------------------------------------------- 1 | vim.wo.spell = true 2 | vim.bo.spelllang = 'en_us' 3 | -------------------------------------------------------------------------------- /index.norg: -------------------------------------------------------------------------------- 1 | @document.meta 2 | title: index 3 | description: 4 | authors: tarun 5 | categories: 6 | created: 2022-01-07 7 | version: 0.0.9 8 | @end 9 | 10 | * Plugins 11 | - [x] Autopairs 12 | - [x] Telescope 13 | - [x] Gitsigns 14 | - [x] Toggleterm 15 | - [x] IndentLine 16 | - [x] Colorizer 17 | - [x] Shade.nvim 18 | - [x] Impatient 19 | - [x] Lightspeed 20 | - [x] Duckytype 21 | - [x] Dashboard 22 | 23 | * Fixes 24 | - [x] Fix copy-paste problem 25 | - [x] Fix Comments 26 | - [x] Fix Luacheck warning 27 | @code lua 28 | -- Create .luacheckrc 29 | -- In .luacheckrc 30 | globals = { 31 | "vim", 32 | "PACKER_BOOTSTRAP" 33 | } 34 | @end 35 | - [x] Fix lualine thingy 36 | - [x] Fix themer 37 | - [x] Fix comment 38 | - [x] Fix stupid cmp 39 | 40 | * Features 41 | - [x] Formatting 42 | - [x] Fix formatting thingy 43 | - [x] Linting 44 | - [x] Lazy-loading 45 | - [x] Inline diagnostics 46 | 47 | * Chores 48 | - [x] Move all my configurations into separate files 49 | - [x] Fix indentation in all configurations 50 | - [ ] Switch to new `vim.keymap.set` 51 | -------------------------------------------------------------------------------- /init.lua: -------------------------------------------------------------------------------- 1 | -- ____ _ __ ___ 2 | -- | __ ) ___ | |_\ \ / (_)_ __ ___ 3 | -- | _ \ / _ \| '_ \ \ / /| | '_ ` _ \ 4 | -- | |_) | (_) | |_) \ V / | | | | | | | 5 | -- |____/ \___/|_.__/ \_/ |_|_| |_| |_| 6 | -- Author: https://github.com/TarunDaCoder 7 | -- GitHub: https://github.com/TarunDaCoder/BobVim 8 | -- License: MIT License Copyright (c) 2022 by TarunDaCoder 9 | 10 | -- vim.defer_fn(function() 11 | -- LSP 12 | require('tarun.lsp') 13 | require('tarun.lsp.null-ls') 14 | require('tarun.lsp.lspkind') 15 | require('tarun.lsp.trouble') 16 | 17 | -- Core 18 | require('tarun.core.settings') 19 | require('tarun.core.plugins') 20 | require('tarun.core.keymaps') 21 | require('tarun.core.autocmds') 22 | require('tarun.core.functions') 23 | 24 | -- Plugins 25 | require('tarun.configs.autosave') 26 | require('tarun.configs.cursorline') 27 | require('tarun.configs.comment') 28 | require('tarun.configs.duckytype') 29 | require('tarun.configs.themer') 30 | require('tarun.configs.telescope') 31 | require('tarun.configs.bufferline') 32 | require('tarun.configs.cmp') 33 | require('tarun.configs.nvim_tree') 34 | require('tarun.configs.autopairs') 35 | require('tarun.configs.neorg') 36 | require('tarun.configs.treesitter') 37 | require('tarun.configs.gitsigns') 38 | require('tarun.configs.colorizer') 39 | require('tarun.configs.indentline') 40 | require('tarun.configs.alpha') 41 | require('tarun.configs.copilot') 42 | require('tarun.configs.whichkey') 43 | require('tarun.configs.feline') 44 | require('tarun.configs.zone') 45 | -- end, 1) 46 | 47 | -- Some secret stuff to reduce my strartup time 48 | vim.g.loaded_gzip = 1 49 | vim.g.loaded_tar = 1 50 | vim.g.loaded_tarPlugin = 1 51 | vim.g.loaded_zip = 1 52 | vim.g.loaded_zipPlugin = 1 53 | vim.g.loaded_getscript = 1 54 | vim.g.loaded_getscriptPlugin = 1 55 | vim.g.loaded_vimball = 1 56 | vim.g.loaded_vimballPlugin = 1 57 | vim.g.loaded_matchit = 1 58 | vim.g.loaded_matchparen = 1 59 | vim.g.loaded_2html_plugin = 1 60 | vim.g.loaded_logiPat = 1 61 | vim.g.loaded_rrhelper = 1 62 | vim.g.loaded_netrw = 1 63 | vim.g.loaded_netrwPlugin = 1 64 | vim.g.loaded_netrwSettings = 1 65 | vim.g.loaded_ftplugin = 1 66 | vim.g.did_load_ftplugin = 1 67 | 68 | vim.g.loaded_python3_provider = 1 69 | vim.g.loaded_python_provider = 1 70 | vim.g.loaded_ruby_provider = 1 71 | vim.g.loaded_perl_provider = 1 72 | -------------------------------------------------------------------------------- /lua/tarun/configs/alpha.lua: -------------------------------------------------------------------------------- 1 | local status_ok, alpha = pcall(require, 'alpha') 2 | if not status_ok then 3 | return 4 | end 5 | 6 | local dashboard = require('alpha.themes.dashboard') 7 | dashboard.section.header.val = { 8 | [[ __ ]], 9 | [[ ___ ___ ___ __ __ /\_\ ___ ___ ]], 10 | [[ / _ `\ / __`\ / __`\/\ \/\ \\/\ \ / __` __`\ ]], 11 | [[/\ \/\ \/\ __//\ \_\ \ \ \_/ |\ \ \/\ \/\ \/\ \ ]], 12 | [[\ \_\ \_\ \____\ \____/\ \___/ \ \_\ \_\ \_\ \_\]], 13 | [[ \/_/\/_/\/____/\/___/ \/__/ \/_/\/_/\/_/\/_/]], 14 | } 15 | 16 | dashboard.section.buttons.val = { 17 | dashboard.button('f', '' .. ' Find file', ':Telescope find_files '), 18 | dashboard.button('e', '' .. ' New file', ':ene startinsert '), 19 | dashboard.button('p', '' .. ' Find project', ':Telescope project project '), 20 | dashboard.button('r', '' .. ' Recent files', ':Telescope oldfiles '), 21 | dashboard.button('t', '' .. ' Find text', ':Telescope live_grep '), 22 | dashboard.button('s', '' .. ' Find Session', ':Telescope sessions_picker '), 23 | dashboard.button('c', '' .. ' Config', ':e ~/.config/nvim/init.lua '), 24 | dashboard.button('q', '' .. ' Quit', ':qa'), 25 | } 26 | 27 | local function footer() 28 | -- NOTE: requires the fortune-mod package to work 29 | -- local handle = io.popen("fortune") 30 | -- local fortune = handle:read("*a") 31 | -- handle:close() 32 | -- return fortune 33 | return 'github.com/TarunDaCoder' 34 | end 35 | 36 | dashboard.section.footer.val = footer() 37 | 38 | dashboard.section.footer.opts.hl = 'Type' 39 | dashboard.section.header.opts.hl = 'Include' 40 | dashboard.section.buttons.opts.hl = 'Keyword' 41 | 42 | dashboard.opts.opts.noautocmd = true 43 | -- vim.cmd([[autocmd User AlphaReady echo 'ready']]) 44 | alpha.setup(dashboard.opts) 45 | -------------------------------------------------------------------------------- /lua/tarun/configs/autopairs.lua: -------------------------------------------------------------------------------- 1 | local autop_status_ok, autop = pcall(require, 'nvim-autopairs') 2 | if not autop_status_ok then 3 | return 4 | end 5 | 6 | autop.setup({ 7 | check_ts = true, 8 | ts_config = { 9 | lua = { 'string', 'source' }, 10 | javascript = { 'string', 'template_string' }, 11 | java = false, 12 | }, 13 | disable_filetype = { 'TelescopePrompt', 'spectre_panel' }, 14 | fast_wrap = { 15 | map = '', 16 | chars = { '{', '[', '(', '"', "'" }, 17 | pattern = string.gsub([[ [%'%"%)%>%]%)%}%,] ]], '%s+', ''), 18 | offset = 0, -- Offset from pattern match 19 | end_key = '$', 20 | keys = 'qwertyuiopzxcvbnmasdfghjkl', 21 | check_comma = true, 22 | highlight = 'PmenuSel', 23 | highlight_grey = 'LineNr', 24 | }, 25 | }) 26 | 27 | local cmp_autopairs = require('nvim-autopairs.completion.cmp') 28 | local cmp_status_ok, cmp = pcall(require, 'cmp') 29 | if not cmp_status_ok then 30 | return 31 | end 32 | cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = '' } })) 33 | -------------------------------------------------------------------------------- /lua/tarun/configs/autosave.lua: -------------------------------------------------------------------------------- 1 | local status_ok, autosave = pcall(require, 'autosave') 2 | if not status_ok then 3 | return 4 | end 5 | 6 | autosave.setup({ 7 | execution_message = 'Just saved your file before the world collapses or you type `:qa!`', 8 | write_all_buffers = true, 9 | }) 10 | -------------------------------------------------------------------------------- /lua/tarun/configs/bufferline.lua: -------------------------------------------------------------------------------- 1 | local status_ok, bufferline = pcall(require, 'bufferline') 2 | if not status_ok then 3 | return 4 | end 5 | 6 | bufferline.setup() 7 | -------------------------------------------------------------------------------- /lua/tarun/configs/cmp.lua: -------------------------------------------------------------------------------- 1 | local status_ok, cmp = pcall(require, 'cmp') 2 | if not status_ok then 3 | return 4 | end 5 | 6 | local lsnip_status_ok, luasnip = pcall(require, 'luasnip') 7 | if not lsnip_status_ok then 8 | return 9 | end 10 | 11 | require('luasnip/loaders/from_vscode').lazy_load() 12 | 13 | local check_backspace = function() 14 | local col = vim.fn.col('.') - 1 15 | return col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') 16 | end 17 | 18 | --   פּ ﯟ   some other good icons 19 | -- local kind_icons = { 20 | -- Text = "", 21 | -- Method = "m", 22 | -- Function = "", 23 | -- Constructor = "", 24 | -- Field = "", 25 | -- Variable = "", 26 | -- Class = "", 27 | -- Interface = "", 28 | -- Module = "", 29 | -- Property = "", 30 | -- Unit = "", 31 | -- Value = "", 32 | -- Enum = "", 33 | -- Keyword = "", 34 | -- Snippet = "", 35 | -- Color = "", 36 | -- File = "", 37 | -- Reference = "", 38 | -- Folder = "", 39 | -- EnumMember = "", 40 | -- Constant = "", 41 | -- Struct = "", 42 | -- Event = "", 43 | -- Operator = "", 44 | -- TypeParameter = "", 45 | -- } 46 | -- find more here: https://www.nerdfonts.com/cheat-sheet 47 | 48 | local border = { 49 | '╔', 50 | '═', 51 | '╗', 52 | '║', 53 | '╝', 54 | '═', 55 | '╚', 56 | '║', 57 | } 58 | 59 | cmp.setup({ 60 | completion = { 61 | border = border, 62 | }, 63 | window = { 64 | documentation = { border = 'rounded' }, 65 | completion = { border = 'rounded' }, 66 | }, 67 | snippet = { 68 | expand = function(args) 69 | luasnip.lsp_expand(args.body) -- For `luasnip` users. 70 | end, 71 | }, 72 | mapping = { 73 | [''] = cmp.mapping.select_prev_item(), 74 | [''] = cmp.mapping.select_next_item(), 75 | [''] = cmp.mapping(cmp.mapping.scroll_docs(-1), { 'i', 'c' }), 76 | [''] = cmp.mapping(cmp.mapping.scroll_docs(1), { 'i', 'c' }), 77 | [''] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }), 78 | [''] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `` mapping. 79 | [''] = cmp.mapping({ 80 | i = cmp.mapping.abort(), 81 | c = cmp.mapping.close(), 82 | }), 83 | -- Accept currently selected item. If none selected, `select` first item. 84 | -- Set `select` to `false` to only confirm explicitly selected items. 85 | [''] = cmp.mapping.confirm({ select = true }), 86 | [''] = cmp.mapping(function(fallback) 87 | if cmp.visible() then 88 | cmp.select_next_item() 89 | elseif luasnip.expandable() then 90 | luasnip.expand() 91 | elseif luasnip.expand_or_jumpable() then 92 | luasnip.expand_or_jump() 93 | elseif check_backspace() then 94 | fallback() 95 | else 96 | fallback() 97 | end 98 | end, { 99 | 'i', 100 | 's', 101 | }), 102 | [''] = cmp.mapping(function(fallback) 103 | if cmp.visible() then 104 | cmp.select_prev_item() 105 | elseif luasnip.jumpable(-1) then 106 | luasnip.jump(-1) 107 | else 108 | fallback() 109 | end 110 | end, { 111 | 'i', 112 | 's', 113 | }), 114 | [''] = cmp.mapping(function(fallback) 115 | cmp.mapping.abort() 116 | local copilot_keys = vim.fn['copilot#Accept']() 117 | if copilot_keys ~= '' then 118 | vim.api.nvim_feedkeys(copilot_keys, 'i', true) 119 | else 120 | fallback() 121 | end 122 | end, { 123 | 'i', 124 | 's', 125 | }), 126 | }, 127 | formatting = { 128 | -- fields = { 'kind', 'abbr', 'menu' }, 129 | format = require('lspkind').cmp_format({ 130 | with_text = false, 131 | menu = { 132 | buffer = '[Buf]', 133 | nvim_lsp = '[LSP]', 134 | nvim_lua = '[Lua]', 135 | path = '[Path]', 136 | neorg = '[Neorg]', 137 | luasnip = '[LuaSnip]', 138 | }, 139 | }), 140 | 141 | -- format = function(entry, vim_item) 142 | -- -- Kind icons 143 | -- vim_item.kind = string.format("%s", kind_icons[vim_item.kind]) 144 | -- -- vim_item.kind = string.format('%s %s', kind_icons[vim_item.kind], vim_item.kind) -- This concatonates the icons with the name of the item kind 145 | -- vim_item.menu = ({ 146 | -- luasnip = "", 147 | -- })[entry.source.name] 148 | -- return vim_item 149 | -- end, 150 | }, 151 | sources = { 152 | { name = 'neorg' }, 153 | { name = 'luasnip' }, 154 | { name = 'buffer' }, 155 | { name = 'path' }, 156 | { name = 'nvim_lua' }, 157 | { name = 'nvim_lsp' }, 158 | }, 159 | confirm_opts = { 160 | behavior = cmp.ConfirmBehavior.Replace, 161 | select = false, 162 | }, 163 | experimental = { 164 | ghost_text = true, 165 | native_menu = false, 166 | }, 167 | }) 168 | 169 | cmp.setup.cmdline(':', { 170 | sources = { 171 | { name = 'cmdline' }, 172 | }, 173 | }) 174 | 175 | cmp.setup.cmdline('/', { 176 | sources = { 177 | { name = 'buffer' }, 178 | }, 179 | }) 180 | -------------------------------------------------------------------------------- /lua/tarun/configs/colorizer.lua: -------------------------------------------------------------------------------- 1 | local status_ok, colorizer = pcall(require, 'colorizer') 2 | if not status_ok then 3 | return 4 | end 5 | 6 | colorizer.setup({ 7 | 'css', 8 | 'lua', 9 | 'javascript', 10 | 'html', 11 | 'rust', 12 | }) 13 | -------------------------------------------------------------------------------- /lua/tarun/configs/comment.lua: -------------------------------------------------------------------------------- 1 | local status_ok, comment = pcall(require, 'Comment') 2 | if not status_ok then 3 | return 4 | end 5 | 6 | local todo_status_ok, todo = pcall(require, 'todo-comments') 7 | if not todo_status_ok then 8 | return 9 | end 10 | 11 | comment.setup({ 12 | padding = true, 13 | sticky = true, 14 | ignore = '^$', 15 | toggler = { 16 | line = 'gcc', 17 | block = 'gbc', 18 | }, 19 | opleader = { 20 | line = 'gc', 21 | block = 'gb', 22 | }, 23 | pre_hook = function(ctx) 24 | local U = require('Comment.utils') 25 | 26 | local location = nil 27 | if ctx.ctype == U.ctype.block then 28 | location = require('ts_context_commentstring.utils').get_cursor_location() 29 | elseif ctx.cmotion == U.cmotion.v or ctx.cmotion == U.cmotion.V then 30 | location = require('ts_context_commentstring.utils').get_visual_start_location() 31 | end 32 | 33 | return require('ts_context_commentstring.internal').calculate_commentstring({ 34 | key = ctx.ctype == U.ctype.line and '__default' or '__multiline', 35 | location = location, 36 | }) 37 | end, 38 | }) 39 | 40 | todo.setup() 41 | -------------------------------------------------------------------------------- /lua/tarun/configs/copilot.lua: -------------------------------------------------------------------------------- 1 | local g = vim.g 2 | 3 | g.copilot_no_tab_map = true 4 | g.copilot_filetypes = { 5 | ['*'] = false, 6 | ['javascript'] = true, 7 | ['typescript'] = true, 8 | ['lua'] = true, 9 | ['rust'] = true, 10 | ['c'] = true, 11 | ['c#'] = true, 12 | ['c++'] = true, 13 | ['go'] = true, 14 | ['python'] = true, 15 | } 16 | -------------------------------------------------------------------------------- /lua/tarun/configs/cursorline.lua: -------------------------------------------------------------------------------- 1 | local status_ok, curline = pcall(require, 'nvim-cursorline') 2 | if not status_ok then 3 | return 4 | end 5 | 6 | curline.setup({ 7 | cursorline = { 8 | enable = true, 9 | number = true, 10 | timeout = 500, 11 | }, 12 | cursorword = { 13 | enable = true, 14 | hl = { underline = true }, 15 | }, 16 | }) 17 | -------------------------------------------------------------------------------- /lua/tarun/configs/duckytype.lua: -------------------------------------------------------------------------------- 1 | local status_ok, ducky = pcall(require, 'duckytype') 2 | if not status_ok then 3 | return 4 | end 5 | 6 | ducky.setup() 7 | -------------------------------------------------------------------------------- /lua/tarun/configs/feline.lua: -------------------------------------------------------------------------------- 1 | local status_ok, feline = pcall(require, 'feline') 2 | if not status_ok then 3 | return 4 | end 5 | 6 | feline.setup({ 7 | -- components = require("catppuccin.core.integrations.feline"), 8 | }) 9 | -------------------------------------------------------------------------------- /lua/tarun/configs/gitsigns.lua: -------------------------------------------------------------------------------- 1 | local status_ok, gitsigns = pcall(require, 'gitsigns') 2 | if not status_ok then 3 | return 4 | end 5 | 6 | gitsigns.setup({ 7 | signcolumn = true, 8 | numhl = true, 9 | current_line_blame = true, 10 | preview_config = { 11 | border = 'single', 12 | style = 'minimal', 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /lua/tarun/configs/indentline.lua: -------------------------------------------------------------------------------- 1 | local status_ok, indentline = pcall(require, 'indent_blankline') 2 | if not status_ok then 3 | return 4 | end 5 | 6 | local g = vim.g 7 | 8 | indentline.setup({ 9 | show_current_context = true, 10 | show_current_context_start = true, 11 | space_char_blankline = ' ', 12 | }) 13 | g.indent_blankline_filetype_exclude = { 14 | 'help', 15 | 'startify', 16 | 'dashboard', 17 | 'packer', 18 | 'NvimTree', 19 | 'Trouble', 20 | 'LspInfo', 21 | 'LspInstallInfo', 22 | } 23 | g.indent_blankline_char = '▏' 24 | g.indent_blankline_show_trailing_blankline_indent = true 25 | g.indent_blankline_show_first_indent_level = true 26 | g.indent_blankline_use_treesitter = true 27 | -------------------------------------------------------------------------------- /lua/tarun/configs/neorg.lua: -------------------------------------------------------------------------------- 1 | local status_ok, neorg = pcall(require, 'neorg') 2 | if not status_ok then 3 | return 4 | end 5 | 6 | neorg.setup({ 7 | load = { 8 | ['core.defaults'] = {}, 9 | ['core.norg.completion'] = { 10 | config = { 11 | engine = 'nvim-cmp', 12 | }, 13 | }, 14 | ['core.norg.concealer'] = { 15 | config = { 16 | markup_preset = 'conceal', 17 | icon_preset = 'diamond', 18 | icons = { 19 | marker = { 20 | icon = ' ', 21 | }, 22 | todo = { 23 | enable = true, 24 | pending = { 25 | -- icon = "" 26 | icon = '', 27 | }, 28 | uncertain = { 29 | icon = '?', 30 | }, 31 | urgent = { 32 | icon = '', 33 | }, 34 | on_hold = { 35 | icon = '', 36 | }, 37 | cancelled = { 38 | icon = '', 39 | }, 40 | }, 41 | }, 42 | }, 43 | }, 44 | ['core.norg.dirman'] = { 45 | config = { 46 | workspaces = { 47 | bobvim_todos = '~/.config/nvim/', 48 | neorg = '~/.norg/', 49 | }, 50 | autodetect = true, 51 | autochdir = true, 52 | }, 53 | }, 54 | ['core.integrations.telescope'] = {}, 55 | }, 56 | }) 57 | -------------------------------------------------------------------------------- /lua/tarun/configs/nvim_tree.lua: -------------------------------------------------------------------------------- 1 | local g = vim.g 2 | 3 | g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names 4 | g.nvim_tree_git_hl = 0 5 | g.nvim_tree_highlight_opened_files = 0 6 | g.nvim_tree_root_folder_modifier = ':~' 7 | 8 | g.nvim_tree_show_icons = { 9 | folders = 1, 10 | files = 1, 11 | git = 1, 12 | } 13 | 14 | g.nvim_tree_icons = { 15 | default = '', 16 | symlink = '', 17 | git = { 18 | unstaged = '', 19 | staged = '✓', 20 | unmerged = '', 21 | renamed = '➜', 22 | deleted = '', 23 | untracked = '★', 24 | ignored = '◌', 25 | }, 26 | folder = { 27 | default = '', 28 | open = '', 29 | empty = '', 30 | empty_open = '', 31 | symlink = '', 32 | }, 33 | } 34 | 35 | local status_ok, nvim_tree = pcall(require, 'nvim-tree') 36 | if not status_ok then 37 | return 38 | end 39 | 40 | local config_status_ok, nvim_tree_config = pcall(require, 'nvim-tree.config') 41 | if not config_status_ok then 42 | return 43 | end 44 | 45 | local tree_cb = nvim_tree_config.nvim_tree_callback 46 | 47 | nvim_tree.setup({ 48 | disable_netrw = true, 49 | hijack_netrw = true, 50 | open_on_setup = false, 51 | ignore_ft_on_setup = { 52 | 'startup', 53 | }, 54 | open_on_tab = false, 55 | hijack_cursor = true, 56 | update_cwd = true, 57 | diagnostics = { 58 | enable = true, 59 | icons = { 60 | hint = '', 61 | info = '', 62 | warning = '', 63 | error = '', 64 | }, 65 | }, 66 | update_focused_file = { 67 | enable = true, 68 | update_cwd = false, 69 | }, 70 | git = { 71 | enable = true, 72 | ignore = true, 73 | timeout = 2000, 74 | }, 75 | view = { 76 | width = 25, 77 | hide_root_folder = true, 78 | side = 'left', 79 | mappings = { 80 | custom_only = false, 81 | list = { 82 | { key = { 'l', '', 'o' }, cb = tree_cb('edit') }, 83 | { key = 'h', cb = tree_cb('close_node') }, 84 | { key = 'v', cb = tree_cb('vsplit') }, 85 | }, 86 | }, 87 | number = false, 88 | relativenumber = false, 89 | }, 90 | renderer = { 91 | indent_markers = { 92 | enable = true, 93 | }, 94 | }, 95 | }) 96 | -------------------------------------------------------------------------------- /lua/tarun/configs/telescope.lua: -------------------------------------------------------------------------------- 1 | require('telescope').load_extension('file_browser') 2 | require('telescope').load_extension('packer') 3 | -- require("telescope").extensions.live_grep_raw.live_grep_raw() 4 | require('telescope').load_extension('zoxide') 5 | require('telescope').load_extension('sessions_picker') 6 | require('telescope').load_extension('project') 7 | 8 | require('telescope').setup({ 9 | defaults = { 10 | prompt_prefix = '  ', 11 | selection_caret = ' ', 12 | entry_prefix = ' ', 13 | initial_mode = 'insert', 14 | selection_strategy = 'reset', 15 | sorting_strategy = 'ascending', 16 | layout_strategy = 'horizontal', 17 | layout_config = { 18 | horizontal = { 19 | prompt_position = 'top', 20 | preview_width = 0.55, 21 | results_width = 0.9, 22 | }, 23 | vertical = { 24 | mirror = false, 25 | }, 26 | width = 0.87, 27 | height = 0.80, 28 | preview_cutoff = 120, 29 | }, 30 | winblend = 30, 31 | border = {}, 32 | borderchars = { '─', '│', '─', '│', '╭', '╮', '╯', '╰' }, 33 | 34 | color_devicons = true, 35 | }, 36 | extensions = { 37 | sessions_picker = { 38 | sessions_dir = vim.fn.stdpath('data') .. '/sessions/', 39 | }, 40 | }, 41 | }) 42 | -------------------------------------------------------------------------------- /lua/tarun/configs/themer.lua: -------------------------------------------------------------------------------- 1 | -- require('themer').setup({ 2 | -- colorscheme = 'catppuccin', 3 | -- styles = { 4 | -- comment = { style = 'italic' }, 5 | -- ['function'] = { style = 'italic' }, 6 | -- functionbuiltin = { style = 'italic' }, 7 | -- variable = { style = 'italic' }, 8 | -- variableBuiltIn = { style = 'italic' }, 9 | -- parameter = { style = 'italic' }, 10 | -- }, 11 | -- }) 12 | 13 | -- Dawn - Latte, Noon - frappe, storm - macchiato, dusk - moccha 14 | 15 | vim.g.catppuccin_flavour = 'macchiato' 16 | vim.cmd([[colorscheme catppuccin]]) 17 | 18 | local status_ok, ctp = pcall(require, 'catppuccin') 19 | if not status_ok then 20 | return 21 | end 22 | 23 | ctp.setup({ 24 | integrations = { 25 | lsp_trouble = true, 26 | indent_blankline = { 27 | colored_indent_levels = true, 28 | }, 29 | lightspeed = true, 30 | ts_rainbow = true, 31 | }, 32 | }) 33 | -------------------------------------------------------------------------------- /lua/tarun/configs/treesitter.lua: -------------------------------------------------------------------------------- 1 | local parser_configs = require('nvim-treesitter.parsers').get_parser_configs() 2 | 3 | parser_configs.norg = { 4 | install_info = { 5 | url = 'https://github.com/nvim-neorg/tree-sitter-norg', 6 | files = { 'src/parser.c', 'src/scanner.cc' }, 7 | branch = 'main', 8 | }, 9 | } 10 | 11 | require('nvim-treesitter.configs').setup({ 12 | highlight = { 13 | enable = true, -- false will disable the whole extension 14 | additional_vim_regex_highlighting = true, 15 | disable = { 'latex' }, 16 | }, 17 | ensure_installed = { 'norg', 'javascript', 'html', 'css', 'lua' }, 18 | matchup = { 19 | enable = false, 20 | }, 21 | context_commentstring = { 22 | enable = true, 23 | config = { css = '// %s' }, 24 | enable_autocmd = false, 25 | }, 26 | indent = { enable = true }, 27 | autotag = { enable = true }, 28 | autopairs = { enable = true }, 29 | playground = { 30 | enable = true, 31 | updatetime = 25, 32 | persist_queries = false, 33 | keybindings = { 34 | toggle_query_editor = 'o', 35 | toggle_hl_groups = 'i', 36 | toggle_injected_languages = 't', 37 | toggle_anonymous_nodes = 'a', 38 | toggle_language_display = 'I', 39 | focus_language = 'f', 40 | unfocus_language = 'F', 41 | update = 'R', 42 | goto_node = '', 43 | show_help = '?', 44 | }, 45 | }, 46 | rainbow = { 47 | enable = true, 48 | extended_mode = true, -- Highlight also non-parentheses delimiters, boolean or table: lang -> boolean 49 | max_file_lines = 1000, -- Do not enable for files with more than 1000 lines, int 50 | }, 51 | }) 52 | -------------------------------------------------------------------------------- /lua/tarun/configs/whichkey.lua: -------------------------------------------------------------------------------- 1 | local status_ok, whichkey = pcall(require, 'which-key') 2 | if not status_ok then 3 | return 4 | end 5 | 6 | whichkey.setup({ 7 | window = { 8 | border = 'double', 9 | winblend = 30, 10 | }, 11 | icons = { 12 | breadcrumb = '➜', 13 | separator = '»', 14 | group = '+', 15 | }, 16 | }) 17 | -------------------------------------------------------------------------------- /lua/tarun/configs/zone.lua: -------------------------------------------------------------------------------- 1 | local status_ok, zone = pcall(require, 'zone') 2 | if not status_ok then 3 | return 4 | end 5 | 6 | zone.setup({ 7 | style = 'vanish', 8 | after = 5000, 9 | }) 10 | -------------------------------------------------------------------------------- /lua/tarun/core/autocmds.lua: -------------------------------------------------------------------------------- 1 | local cmd = vim.api.nvim_create_autocmd 2 | local grp = vim.api.nvim_create_augroup 3 | 4 | grp('Shape', {}) 5 | grp('FileReload', {}) 6 | grp('Lsp', {}) 7 | grp('Buffer', {}) 8 | 9 | cmd({ 'VimLeave' }, { 10 | desc = 'Change cursor shape to line when leaving nvim', 11 | command = [[set guicursor=a:ver90]], 12 | group = 'Shape', 13 | }) 14 | 15 | cmd({ 16 | 'FileChangedShellPost', 17 | }, { 18 | desc = 'Actions when the file is changed outside of neovim', 19 | group = 'FileReload', 20 | callback = function() 21 | vim.notify('File changed, reloading buffer', vim.log.levels.ERROR) 22 | end, 23 | }) 24 | 25 | cmd({ 'BufWinEnter', 'BufRead', 'BufNewFile' }, { 26 | command = [[setlocal formatoptions-=o]], 27 | group = 'Buffer', 28 | }) 29 | 30 | cmd({ 'TextYankPost' }, { 31 | desc = 'Highlight while yanking', 32 | group = 'Buffer', 33 | callback = function() 34 | vim.highlight.on_yank({ higroup = 'Visual' }) 35 | end, 36 | }) 37 | 38 | cmd({ 'CursorHold' }, { 39 | desc = 'Open float when there is diagnostics', 40 | group = 'Lsp', 41 | callback = vim.diagnostic.open_float, 42 | }) 43 | 44 | cmd({ 'BufWritePre' }, { 45 | pattern = '', 46 | desc = 'Format on save', 47 | group = 'Lsp', 48 | command = [[lua vim.lsp.buf.format(nil, 2000)]], 49 | }) 50 | 51 | cmd({ 'BufNewFile', 'BufRead' }, { 52 | pattern = '*.ejs', 53 | desc = 'Set .ejs files to html filetype', 54 | group = 'Buffer', 55 | command = [[set filetype=html]], 56 | }) 57 | -------------------------------------------------------------------------------- /lua/tarun/core/functions.lua: -------------------------------------------------------------------------------- 1 | -- Get last insertion 2 | 3 | local function show_gi_mark() 4 | local cursor_pos = vim.api.nvim_win_get_cursor(0) -- Get actual position 5 | 6 | local ok, _ = pcall(vim.cmd, 'normal `.') 7 | if ok then 8 | Mark_last = vim.api.nvim_win_get_cursor(0) -- Get the position 9 | else 10 | return 11 | end 12 | 13 | vim.api.nvim_win_set_cursor(0, cursor_pos) -- Restore position 14 | 15 | local line_num = Mark_last[1] - 1 16 | 17 | vim.api.nvim_set_hl(0, 'ShowgiMark', { bg = 'NONE', fg = '#c4a7e7' }) 18 | local opts_virtualtext = { 19 | end_line = 0, 20 | id = 1, 21 | virt_text = { { '  Last insertion', 'ShowgiMark' } }, 22 | virt_text_pos = 'eol', 23 | } 24 | 25 | vim.api.nvim_buf_set_extmark( 26 | vim.fn.bufnr('%'), 27 | vim.api.nvim_create_namespace('show_gi_mark'), 28 | line_num, 29 | 0, 30 | opts_virtualtext 31 | ) 32 | end 33 | 34 | vim.api.nvim_create_autocmd('InsertLeave', { 35 | callback = show_gi_mark, 36 | }) 37 | show_gi_mark() 38 | -------------------------------------------------------------------------------- /lua/tarun/core/keymaps.lua: -------------------------------------------------------------------------------- 1 | local opts = { noremap = true, silent = true } 2 | 3 | local term_opts = { silent = true } 4 | 5 | -- Shorten function name 6 | local map = vim.api.nvim_set_keymap 7 | 8 | -- local function test(bufnr) 9 | -- vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', 'lua vim.lsp.buf.definition()', opts) 10 | -- end 11 | 12 | -- Remap space as leader key 13 | map('', '', '', opts) 14 | vim.g.mapleader = ' ' 15 | vim.g.maplocalleader = ' ' 16 | 17 | -- Modes 18 | -- normal_mode = "n", 19 | -- insert_mode = "i", 20 | -- visual_mode = "v", 21 | -- visual_block_mode = "x", 22 | -- term_mode = "t", 23 | -- command_mode = "c", 24 | 25 | -- Keymap to save file 26 | map('n', 'w', ':w', opts) 27 | 28 | -- Normal mode -- 29 | -- Better window navigation 30 | map('n', '', 'h', opts) 31 | map('n', '', 'j', opts) 32 | map('n', '', 'k', opts) 33 | map('n', '', 'l', opts) 34 | 35 | -- Resize with arrows 36 | map('n', '', ':resize +2', opts) 37 | map('n', '', ':resize -2', opts) 38 | map('n', '', ':vertical resize -2', opts) 39 | map('n', '', ':vertical resize +2', opts) 40 | 41 | -- Navigate buffers 42 | -- keymap("n", "", ":bnext", opts) 43 | -- keymap("n", "", ":bprevious", opts) 44 | vim.cmd([[ 45 | nnoremap :BufferLineCycleNext 46 | nnoremap :BufferLineCyclePrev 47 | ]]) 48 | 49 | -- Make highlights dissappear 50 | map('n', 'h', ':set hlsearch!', opts) 51 | 52 | -- Format code 53 | map('n', 'f', ':lua vim.lsp.buf.format(nil, 2000)', opts) 54 | 55 | -- Insert mode -- 56 | -- Quicker escape 57 | map('i', 'jj', '', opts) 58 | 59 | -- Visual mode -- 60 | -- Stay in indent mode 61 | map('v', '<', '', '>gv', opts) 63 | 64 | -- Move text up and down 65 | map('v', '', ':m .+1==', opts) 66 | map('v', '', ':m .-2==', opts) 67 | map('v', 'p', '"_dP', opts) 68 | 69 | -- Visual block mode -- 70 | -- Move text up and down 71 | map('x', 'J', ":move '>+1gv-gv", opts) 72 | map('x', 'K', ":move '<-2gv-gv", opts) 73 | map('x', '', ":move '>+1gv-gv", opts) 74 | map('x', '', ":move '<-2gv-gv", opts) 75 | 76 | -- Terminal mode -- 77 | -- Better terminal navigation 78 | map('t', '', 'h', term_opts) 79 | map('t', '', 'j', term_opts) 80 | map('t', '', 'k', term_opts) 81 | map('t', '', 'l', term_opts) 82 | 83 | -- LSP -- 84 | map('n', 'r', [[lua vim.lsp.buf.rename()]], opts) 85 | map('n', 'gD', [[lua vim.lsp.buf.declaration()]], opts) 86 | map('n', 'gd', [[lua vim.lsp.buf.definition()]], opts) 87 | map('n', 'td', [[lua vim.lsp.buf.type_definition()]], opts) 88 | map('n', 'sh', [[lua vim.lsp.buf.signature_help()]], opts) 89 | 90 | -- PLugin stuff -- 91 | -- NvimTree 92 | map('n', 'e', ':NvimTreeToggle', opts) 93 | 94 | -- Telescope 95 | map('n', 'ff', ':Telescope find_files', opts) 96 | map('n', 'tt', ':Telescope', opts) 97 | map('n', 'th', ':Telescope help_tags', opts) 98 | map('n', 'thl', ':Telescope highlights', opts) 99 | -------------------------------------------------------------------------------- /lua/tarun/core/plugins.lua: -------------------------------------------------------------------------------- 1 | local fn = vim.fn 2 | local cmd = vim.api.nvim_create_autocmd 3 | local grp = vim.api.nvim_create_augroup 4 | 5 | -- Install packer automatically 6 | local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim' 7 | if fn.empty(fn.glob(install_path)) > 0 then 8 | PACKER_BOOTSTRAP = fn.system({ 9 | 'git', 10 | 'clone', 11 | '--depth', 12 | '1', 13 | 'https://github.com/wbthomason/packer.nvim', 14 | install_path, 15 | }) 16 | print('Installing packer close and reopen Neovim...') 17 | vim.cmd([[packadd packer.nvim]]) 18 | end 19 | 20 | -- Autocommand that reloads neovim whenever you save the plugins.lua file 21 | grp('Packer', {}) 22 | cmd({ 'BufWritePost' }, { 23 | pattern = 'plugins.lua', 24 | desc = 'Source plugins.lua and do :PackerSync after save', 25 | group = 'Packer', 26 | command = [[ source | PackerSync]], 27 | }) 28 | 29 | -- Use a protected call so when we don't error out on first use 30 | local packer_ok, packer = pcall(require, 'packer') 31 | if not packer_ok then 32 | return 33 | end 34 | 35 | -- Make packer use a popout window and other stuff 36 | packer.init({ 37 | profile = { enabled = true }, 38 | git = { clone_timeout = 300 }, 39 | display = { 40 | open_fn = function() 41 | return require('packer.util').float({ border = 'double' }) 42 | end, 43 | }, 44 | }) 45 | 46 | -- Install plugins here 47 | return require('packer').startup(function(use) 48 | -- Packer can manage itself 49 | use({ 'wbthomason/packer.nvim' }) 50 | 51 | -- Devicons 52 | use({ 'kyazdani42/nvim-web-devicons' }) 53 | 54 | -- Popup thingy 55 | use({ 'nvim-lua/popup.nvim' }) 56 | 57 | -- Plenary 58 | use({ 'nvim-lua/plenary.nvim' }) 59 | 60 | -- Colourscheme 61 | -- use({ 'themercorp/themer.lua' }) 62 | use({ 'catppuccin/nvim', branch = 'dev', as = 'catppuccin' }) 63 | -- use({ 'tarundacoder/nvim', branch = 'dev', as = 'catppuccin' }) 64 | 65 | -- Status line 66 | use({ 'feline-nvim/feline.nvim' }) 67 | 68 | -- Tabline 69 | use({ 'akinsho/bufferline.nvim' }) 70 | 71 | -- CMP 72 | use({ 'hrsh7th/nvim-cmp', commit = 'dbc72290295cfc63075dab9ea635260d2b72f2e5' }) 73 | use({ 'hrsh7th/cmp-buffer' }) 74 | use({ 'hrsh7th/cmp-path' }) 75 | use({ 'hrsh7th/cmp-cmdline' }) 76 | use({ 'saadparwaiz1/cmp_luasnip' }) 77 | use({ 'hrsh7th/cmp-nvim-lua' }) 78 | use({ 'hrsh7th/cmp-nvim-lsp' }) 79 | 80 | -- Snippets 81 | use({ 'L3MON4D3/LuaSnip' }) 82 | use({ 'rafamadriz/friendly-snippets' }) 83 | 84 | -- Comments 85 | use({ 'numToStr/Comment.nvim' }) 86 | use({ 'folke/todo-comments.nvim' }) 87 | use({ 'JoosepAlviste/nvim-ts-context-commentstring' }) 88 | 89 | -- Better explorer 90 | use({ 'kyazdani42/nvim-tree.lua' }) 91 | 92 | -- LSP 93 | use({ 'neovim/nvim-lspconfig' }) 94 | use({ 'williamboman/nvim-lsp-installer' }) 95 | use({ 'jose-elias-alvarez/null-ls.nvim' }) 96 | use({ 'folke/trouble.nvim', opt = true }) 97 | use({ 'onsails/lspkind-nvim' }) 98 | 99 | -- Autopairs 100 | use({ 'windwp/nvim-autopairs' }) 101 | 102 | -- Telescope 103 | use({ 'nvim-telescope/telescope.nvim' }) 104 | use({ 'nvim-telescope/telescope-file-browser.nvim' }) 105 | use({ 'nvim-telescope/telescope-packer.nvim' }) 106 | use({ 'nvim-telescope/telescope-rg.nvim', requires = { 'nvim-telescope/telescope-live-grep-raw.nvim' } }) 107 | use({ 'jvgrootveld/telescope-zoxide' }) 108 | use({ 'joseconseco/telescope_sessions_picker.nvim' }) 109 | use({ 'nvim-telescope/telescope-project.nvim' }) 110 | use({ 'nvim-neorg/neorg-telescope' }) 111 | 112 | -- Neorg 113 | use({ 'nvim-neorg/neorg', requires = 'nvim-lua/plenary.nvim' }) 114 | 115 | -- Treesitter 116 | use({ 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' }) 117 | use({ 'p00f/nvim-ts-rainbow' }) 118 | use({ 'nvim-treesitter/playground' }) 119 | 120 | -- Gitsigns 121 | use({ 'lewis6991/gitsigns.nvim' }) 122 | -- Colorizer 123 | use({ 'norcalli/nvim-colorizer.lua' }) 124 | 125 | -- Indent-blankline 126 | use({ 'lukas-reineke/indent-blankline.nvim' }) 127 | 128 | -- Toggleterm 129 | use({ 'akinsho/toggleterm.nvim', opt = true }) 130 | 131 | -- Notify 132 | use({ 133 | 'rcarriga/nvim-notify', 134 | config = function() 135 | vim.notify = require('notify') 136 | end, 137 | }) 138 | 139 | -- Dashboard 140 | use({ 'goolord/alpha-nvim' }) 141 | 142 | -- Highlight lines and words under the cursor 143 | use({ 'yamatsum/nvim-cursorline' }) 144 | 145 | -- GitHub Copilot 146 | use({ 'github/copilot.vim' }) 147 | 148 | -- Wordle 149 | use({ 'shift-d/wordle.nvim', branch = 'finish-win', opt = true }) 150 | 151 | -- WhichKey 152 | use({ 'folke/which-key.nvim', opt = true }) 153 | 154 | -- LightSpeed 155 | use({ 'ggandor/lightspeed.nvim' }) 156 | 157 | -- Impatient 158 | use({ 159 | 'lewis6991/impatient.nvim', 160 | config = function() 161 | require('impatient') 162 | end, 163 | }) 164 | 165 | -- AutoSave 166 | use({ 'Pocco81/AutoSave.nvim', opt = true }) 167 | 168 | -- Typing test 169 | use('kwakzalver/duckytype.nvim') 170 | 171 | -- Get in the zooooone 172 | use({ 'tamton-aquib/zone.nvim', opt = true }) 173 | 174 | -- Automatically set up the config after cloning packer.nvim 175 | -- This needs to be at the end after all the plugins 176 | if PACKER_BOOTSTRAP then 177 | require('packer').sync() 178 | end 179 | end) 180 | -------------------------------------------------------------------------------- /lua/tarun/core/settings.lua: -------------------------------------------------------------------------------- 1 | local cmd = vim.cmd 2 | 3 | local options = { 4 | backup = false, -- creates a backup file 5 | cmdheight = 1, -- more space in the neovim command line for displaying messages 6 | completeopt = { 'menuone', 'noselect' }, -- mostly just for cmp 7 | conceallevel = 0, -- so that `` is visible in markdown files 8 | fileencoding = 'utf-8', -- the encoding written to a file 9 | hlsearch = true, -- highlight all matches on previous search pattern 10 | ignorecase = true, -- ignore case in search patterns 11 | mouse = 'a', -- allow the mouse to be used in neovim 12 | pumheight = 10, -- pop up menu height 13 | showmode = false, -- we don't need to see things like -- INSERT -- anymore 14 | showtabline = 2, -- always show tabs 15 | smartcase = true, -- smart case 16 | smartindent = true, -- make indenting smarter again 17 | splitbelow = true, -- force all horizontal splits to go below current window 18 | splitright = true, -- force all vertical splits to go to the right of current window 19 | swapfile = false, -- creates a swapfile 20 | termguicolors = true, -- set term gui colors (most terminals support this) 21 | timeoutlen = 500, -- time to wait for a mapped sequence to complete (in milliseconds) 22 | laststatus = 3, 23 | undofile = true, -- enable persistent undo 24 | updatetime = 300, -- faster completion (4000ms default) 25 | writebackup = false, -- if a file is being edited by another program (or was written to file while editing with another program), it is not allowed to be edited 26 | expandtab = true, -- convert tabs to spaces 27 | shiftwidth = 4, -- the number of spaces inserted for each indentation 28 | tabstop = 4, -- insert 4 spaces for a tab 29 | number = true, -- set numbered lines 30 | relativenumber = true, -- set relative numbered lines 31 | numberwidth = 4, -- set number column width to 2 {default 4} 32 | signcolumn = 'yes:3', -- always show the sign column, otherwise it would shift the text each time 33 | wrap = true, -- display lines as one long line 34 | clipboard = 'unnamedplus', -- allows neovim to access the system clipboard 35 | } 36 | 37 | vim.opt.shortmess:append('c') 38 | 39 | for k, v in pairs(options) do 40 | vim.opt[k] = v 41 | end 42 | 43 | cmd([[set whichwrap+=<,>,[,],h,l]]) 44 | cmd([[set iskeyword+=-]]) 45 | cmd([[set formatoptions-=cro]]) 46 | 47 | vim.g.indent_blankline_buftype_exclude = { 'terminal', 'nofile' } 48 | vim.g.indent_blankline_filetype_exclude = { 49 | 'help', 50 | 'packer', 51 | 'NvimTree', 52 | 'Trouble', 53 | 'lspinfo', 54 | } 55 | -------------------------------------------------------------------------------- /lua/tarun/lsp/init.lua: -------------------------------------------------------------------------------- 1 | local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities()) 2 | local lspconfig = require('lspconfig') 3 | local configs = require('lspconfig.configs') 4 | capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities) 5 | 6 | -- Code from max 7 | local codes = { 8 | no_matching_function = { 9 | message = " Can't find a matching function", 10 | 'redundant-parameter', 11 | 'ovl_no_viable_function_in_call', 12 | }, 13 | empty_block = { 14 | message = " That shouldn't be empty here", 15 | 'empty-block', 16 | }, 17 | missing_symbol = { 18 | message = ' Here should be a symbol', 19 | 'miss-symbol', 20 | }, 21 | expected_semi_colon = { 22 | message = ' Please put the `;` or `,`', 23 | 'expected_semi_declaration', 24 | 'miss-sep-in-table', 25 | 'invalid_token_after_toplevel_declarator', 26 | }, 27 | redefinition = { 28 | message = ' That variable was defined before', 29 | 'redefinition', 30 | 'redefined-local', 31 | }, 32 | no_matching_variable = { 33 | message = " Can't find that variable", 34 | 'undefined-global', 35 | 'reportUndefinedVariable', 36 | }, 37 | trailing_whitespace = { 38 | message = ' Whitespaces are useless', 39 | 'trailing-whitespace', 40 | 'trailing-space', 41 | }, 42 | unused_variable = { 43 | message = " Don't define variables you don't use", 44 | 'unused-local', 45 | }, 46 | unused_function = { 47 | message = " Don't define functions you don't use", 48 | 'unused-function', 49 | }, 50 | useless_symbols = { 51 | message = ' Remove that useless symbols', 52 | 'unknown-symbol', 53 | }, 54 | wrong_type = { 55 | message = ' Try to use the correct types', 56 | 'init_conversion_failed', 57 | }, 58 | undeclared_variable = { 59 | message = ' Have you delcared that variable somewhere?', 60 | 'undeclared_var_use', 61 | }, 62 | lowercase_global = { 63 | message = ' Should that be a global? (if so make it uppercase)', 64 | 'lowercase-global', 65 | }, 66 | } 67 | 68 | local signs = { 69 | { name = 'DiagnosticSignError', text = '' }, 70 | { name = 'DiagnosticSignWarn', text = '' }, 71 | { name = 'DiagnosticSignHint', text = '' }, 72 | { name = 'DiagnosticSignInfo', text = '' }, 73 | } 74 | for _, sign in ipairs(signs) do 75 | vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = '' }) 76 | end 77 | 78 | local border = { 79 | { '╔', 'FloatBorder' }, 80 | { '═', 'FloatBorder' }, 81 | { '╗', 'FloatBorder' }, 82 | { '║', 'FloatBorder' }, 83 | { '╝', 'FloatBorder' }, 84 | { '═', 'FloatBorder' }, 85 | { '╚', 'FloatBorder' }, 86 | { '║', 'FloatBorder' }, 87 | } 88 | 89 | vim.diagnostic.config({ 90 | virtual_text = false, 91 | signs = true, 92 | underline = true, 93 | severity_sort = true, 94 | update_in_insert = true, 95 | float = { 96 | focusable = false, 97 | scope = 'cursor', 98 | source = true, 99 | border = border, 100 | header = { 'Mistakes you made:', 'DiagnosticHeader' }, 101 | prefix = function(diagnostic, i, total) 102 | local icon, highlight 103 | if diagnostic.severity == 1 then 104 | icon = '' 105 | highlight = 'DiagnosticError' 106 | elseif diagnostic.severity == 2 then 107 | icon = '' 108 | highlight = 'DiagnosticWarn' 109 | elseif diagnostic.severity == 3 then 110 | icon = '' 111 | highlight = 'DiagnosticInfo' 112 | elseif diagnostic.severity == 4 then 113 | icon = '' 114 | highlight = 'DiagnosticHint' 115 | end 116 | return i .. '/' .. total .. ' ' .. icon .. ' ', highlight 117 | end, 118 | format = function(diagnostic) 119 | if diagnostic.user_data == nil then 120 | return diagnostic.message 121 | elseif vim.tbl_isempty(diagnostic.user_data) then 122 | return diagnostic.message 123 | end 124 | local code = diagnostic.user_data.lsp.code 125 | for _, table in pairs(codes) do 126 | if vim.tbl_contains(table, code) then 127 | return table.message 128 | end 129 | end 130 | end, 131 | }, 132 | }) 133 | 134 | vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(vim.lsp.handlers.signature_help, { 135 | border = 'rounded', 136 | }) 137 | 138 | local on_attach = function(client) 139 | client.server_capabilities.document_formatting = false 140 | client.server_capabilities.document_range_formatting = false 141 | end 142 | 143 | local lsp_servers = { 144 | 'html', 145 | 'rust_analyzer', 146 | 'cssls', 147 | 'jsonls', 148 | 'tsserver', 149 | 'yamlls', 150 | 'clangd', 151 | 'sumneko_lua', 152 | } 153 | for _, lsp in ipairs(lsp_servers) do 154 | lspconfig[lsp].setup({ 155 | on_attach = on_attach, 156 | capabilities = capabilities, 157 | }) 158 | end 159 | 160 | lspconfig.sumneko_lua.setup({ 161 | settings = { 162 | Lua = { 163 | diagnostics = { 164 | globals = { 'vim' }, 165 | }, 166 | }, 167 | }, 168 | on_attach = function(client) 169 | client.server_capabilities.document_formatting = false 170 | client.server_capabilities.document_range_formatting = false 171 | end, 172 | }) 173 | 174 | lspconfig.tsserver.setup({ 175 | on_attach = function(client) 176 | client.server_capabilities.document_formatting = false 177 | client.server_capabilities.document_range_formatting = false 178 | end, 179 | }) 180 | 181 | lspconfig.html.setup({ 182 | on_attach = function(client) 183 | client.server_capabilities.document_formatting = false 184 | client.server_capabilities.document_range_formatting = false 185 | end, 186 | }) 187 | 188 | lspconfig.cssls.setup({ 189 | on_attach = function(client) 190 | client.server_capabilities.document_formatting = false 191 | client.server_capabilities.document_range_formatting = false 192 | end, 193 | }) 194 | 195 | lspconfig.rust_analyzer.setup({ 196 | on_attach = function(client) 197 | client.server_capabilities.document_formatting = false 198 | client.server_capabilities.document_range_formatting = false 199 | end, 200 | }) 201 | 202 | lspconfig.jsonls.setup({ 203 | on_attach = function(client) 204 | client.server_capabilities.document_formatting = false 205 | client.server_capabilities.document_range_formatting = false 206 | end, 207 | }) 208 | 209 | lspconfig.yamlls.setup({ 210 | on_attach = function(client) 211 | client.server_capabilities.document_formatting = false 212 | client.server_capabilities.document_range_formatting = false 213 | end, 214 | }) 215 | 216 | lspconfig.clangd.setup({ 217 | on_attach = function(client) 218 | client.server_capabilities.document_formatting = false 219 | client.server_capabilities.document_range_formatting = false 220 | end, 221 | }) 222 | 223 | if not configs.ls_emmet then 224 | configs.ls_emmet = { 225 | default_config = { 226 | cmd = { 'ls_emmet', '--stdio' }, 227 | filetypes = { 228 | 'html', 229 | 'css', 230 | 'scss', 231 | 'javascript', 232 | 'javascriptreact', 233 | 'typescript', 234 | 'typescriptreact', 235 | 'haml', 236 | 'xml', 237 | 'xsl', 238 | 'pug', 239 | 'slim', 240 | 'sass', 241 | 'stylus', 242 | 'less', 243 | 'sss', 244 | 'hbs', 245 | 'handlebars', 246 | }, 247 | root_dir = function(fname) 248 | return vim.loop.cwd() 249 | end, 250 | settings = {}, 251 | }, 252 | } 253 | end 254 | 255 | lspconfig.ls_emmet.setup({ capabilities = capabilities }) 256 | -------------------------------------------------------------------------------- /lua/tarun/lsp/lspkind.lua: -------------------------------------------------------------------------------- 1 | local status_ok, lspkind = pcall(require, 'lspkind') 2 | if not status_ok then 3 | return 4 | end 5 | 6 | local fmt = string.format 7 | 8 | local kind_presets = { 9 | default = { 10 | Class = '  ', 11 | Color = '  ', 12 | Constant = '  ', 13 | Constructor = '  ', 14 | Enum = ' 了 ', 15 | EnumMember = '  ', 16 | Event = '  ', 17 | Field = ' ﰠ ', 18 | -- File = " ", 19 | File = '  ', 20 | Folder = '  ', 21 | Function = '  ', 22 | Interface = 'ﰮ ', 23 | Keyword = '  ', 24 | Method = ' ƒ ', 25 | Module = '  ', 26 | Operator = '  ', 27 | Property = '  ', 28 | Reference = '  ', 29 | Snippet = '  ', 30 | -- Snippet = "  ", 31 | -- Snippet = "  ", 32 | -- Snippet = " > ", 33 | Struct = ' ', 34 | Text = '  ', 35 | TypeParameter = ' ', 36 | Unit = ' 塞 ', 37 | Value = '  ', 38 | Variable = '  ', 39 | }, 40 | } 41 | 42 | local kind_order = { 43 | 'Text', 44 | 'Method', 45 | 'Function', 46 | 'Constructor', 47 | 'Field', 48 | 'Variable', 49 | 'Class', 50 | 'Interface', 51 | 'Module', 52 | 'Property', 53 | 'Unit', 54 | 'Value', 55 | 'Enum', 56 | 'Keyword', 57 | 'Snippet', 58 | 'Color', 59 | 'File', 60 | 'Reference', 61 | 'Folder', 62 | 'EnumMember', 63 | 'Constant', 64 | 'Struct', 65 | 'Event', 66 | 'Operator', 67 | 'TypeParameter', 68 | } 69 | local kind_len = 25 70 | 71 | -- default true 72 | local function opt_with_text(opts) 73 | return opts == nil or opts['with_text'] == nil or opts['with_text'] 74 | end 75 | 76 | -- default 'default' 77 | local function opt_preset(opts) 78 | local preset 79 | if opts == nil or opts['preset'] == nil then 80 | preset = 'default' 81 | else 82 | preset = opts['preset'] 83 | end 84 | return preset 85 | end 86 | 87 | function lspkind.init(opts) 88 | local preset = opt_preset(opts) 89 | 90 | local symbol_map = kind_presets[preset] 91 | lspkind.symbol_map = (opts and opts['symbol_map'] and vim.tbl_extend('force', symbol_map, opts['symbol_map'])) 92 | or symbol_map 93 | 94 | local symbols = {} 95 | local len = kind_len 96 | for i = 1, len do 97 | local name = kind_order[i] 98 | symbols[i] = lspkind.symbolic(name, opts) 99 | end 100 | 101 | for k, v in pairs(symbols) do 102 | require('vim.lsp.protocol').CompletionItemKind[k] = v 103 | end 104 | end 105 | 106 | lspkind.presets = kind_presets 107 | lspkind.symbol_map = kind_presets.default 108 | 109 | function lspkind.symbolic(kind, opts) 110 | local with_text = opt_with_text(opts) 111 | 112 | local symbol = lspkind.symbol_map[kind] 113 | if with_text == true then 114 | symbol = symbol and (symbol .. ' ') or '' 115 | return fmt('%s%s', symbol, kind) 116 | else 117 | return symbol 118 | end 119 | end 120 | 121 | function lspkind.cmp_format(opts) 122 | if opts == nil then 123 | opts = {} 124 | end 125 | if opts.preset or opts.symbol_map then 126 | lspkind.init(opts) 127 | end 128 | 129 | return function(entry, vim_item) 130 | vim_item.kind = lspkind.symbolic(vim_item.kind, opts) 131 | 132 | if opts.menu ~= nil then 133 | vim_item.menu = opts.menu[entry.source.name] 134 | end 135 | 136 | if opts.maxwidth ~= nil then 137 | vim_item.abbr = string.sub(vim_item.abbr, 1, opts.maxwidth) 138 | end 139 | 140 | return vim_item 141 | end 142 | end 143 | function lspkind.setup() 144 | local kinds = vim.lsp.protocol.CompletionItemKind 145 | for i, kind in ipairs(kinds) do 146 | kinds[i] = lspkind.icons[kind] or kind 147 | end 148 | end 149 | 150 | return lspkind 151 | -------------------------------------------------------------------------------- /lua/tarun/lsp/null-ls.lua: -------------------------------------------------------------------------------- 1 | local null_ls_status_ok, null_ls = pcall(require, 'null-ls') 2 | if not null_ls_status_ok then 3 | return 4 | end 5 | 6 | -- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting 7 | local formatting = null_ls.builtins.formatting 8 | -- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics 9 | local diagnostics = null_ls.builtins.diagnostics 10 | 11 | null_ls.setup({ 12 | debug = false, 13 | sources = { 14 | -- JavaScript 15 | formatting.prettier, 16 | diagnostics.eslint, 17 | 18 | -- Lua 19 | formatting.stylua, 20 | diagnostics.luacheck, 21 | 22 | -- Rust 23 | formatting.rustfmt, 24 | }, 25 | autostart = true, 26 | }) 27 | -------------------------------------------------------------------------------- /lua/tarun/lsp/trouble.lua: -------------------------------------------------------------------------------- 1 | local status_ok, trouble = pcall(require, 'trouble') 2 | if not status_ok then 3 | return 4 | end 5 | 6 | trouble.setup({ 7 | auto_close = true, 8 | use_diagnostic_signs = true, 9 | }) 10 | -------------------------------------------------------------------------------- /queries/javascript/highlights.scm: -------------------------------------------------------------------------------- 1 | ( 2 | function_declaration 3 | (identifier)@function_definition 4 | ) 5 | -------------------------------------------------------------------------------- /queries/lua/highlights.scm: -------------------------------------------------------------------------------- 1 | ( 2 | (function_call 3 | (identifier) @require_call 4 | (#match? @require_call "require") 5 | ) 6 | (set! "priority" 105) 7 | (#set! conceal "") 8 | ) 9 | 10 | ( 11 | (function_call 12 | (identifier) @pairs 13 | (#match? @pairs "pairs") 14 | ) 15 | (set! "priority" 105) 16 | ) 17 | 18 | (function_declaration 19 | (identifier)@function_definition 20 | ) 21 | ( 22 | (function_declaration 23 | (dot_index_expression 24 | (identifier) 25 | (identifier)@function_definition 26 | ) 27 | ) 28 | (set! "priority" 105) 29 | ) 30 | 31 | ( 32 | (assignment_statement 33 | (variable_list 34 | (identifier)@function_definition 35 | ) 36 | ( 37 | expression_list 38 | (function_definition) 39 | ) 40 | ) 41 | (set! "priority" 105) 42 | ) 43 | ( 44 | (assignment_statement 45 | (variable_list 46 | (dot_index_expression 47 | (identifier) 48 | (identifier)@function_definition 49 | ) 50 | ) 51 | ( 52 | expression_list 53 | (function_definition) 54 | ) 55 | ) 56 | (set! "priority" 105) 57 | ) 58 | 59 | ( 60 | (function_call 61 | name: (identifier) @function 62 | (#eq? @function "pairs") 63 | ) 64 | (#set! conceal "P") 65 | ) 66 | 67 | ( 68 | (function_call 69 | name: (identifier) @function 70 | (#eq? @function "ipairs") 71 | ) 72 | (#set! conceal "I") 73 | ) 74 | 75 | ( 76 | (identifier) @function 77 | (#eq? @function "utils") 78 | (#set! conceal "") 79 | ; (#set! conceal "U") 80 | ) 81 | 82 | ( 83 | (dot_index_expression 84 | table: (identifier) @keyword 85 | (#eq? @keyword "utils" ) 86 | ) 87 | (#set! conceal "U") 88 | ) 89 | 90 | ( 91 | (dot_index_expression) @keyword 92 | (#eq? @keyword "vim.keymap.set" ) 93 | (#set! conceal "襁") 94 | ) 95 | 96 | ( 97 | (dot_index_expression) @function 98 | (#eq? @function "vim.cmd" ) 99 | (#set! conceal ">") 100 | ) 101 | 102 | ; ( 103 | ; (dot_index_expression) @keyword 104 | ; (#eq? @keyword "vim.opt" ) 105 | ; (#set! conceal "opt") 106 | ; ) 107 | 108 | ; ( 109 | ; (dot_index_expression 110 | ; )@keyword 111 | ; (#eq? @keyword "vim.keymap.set" ) 112 | ; (#set! conceal "") 113 | ; ) 114 | 115 | (("return" @keyword) (#set! conceal "")) 116 | ; (("local" @keyword) (#set! conceal "L")) 117 | (("local" @keyword) (#set! conceal "")) 118 | ; (("local" @keyword) (#set! conceal "")) 119 | ; (("function" @keyword) (#set! conceal "")) 120 | (("function" @keyword) (#set! conceal "")) 121 | (("then" @keyword) (#set! conceal "")) 122 | (("not" @keyword) (#set! conceal "")) 123 | (("for" @repeat) (#set! conceal "")) 124 | (("while" @repeat) (#set! conceal "∞")) 125 | 126 | ; for -> circle arrow 127 | ( 128 | (break_statement)@keyword 129 | (#eq? @keyword "break" ) 130 | (#set! conceal "") 131 | ) 132 | -------------------------------------------------------------------------------- /queries/norg/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (heading1) 3 | (heading2) 4 | (heading3) 5 | (heading4) 6 | (heading5) 7 | (heading6) 8 | (ranged_tag) 9 | ] @fold 10 | -------------------------------------------------------------------------------- /queries/rust/highlights.scm: -------------------------------------------------------------------------------- 1 | ( 2 | function_item 3 | ( 4 | identifier 5 | )@function_definition 6 | ) 7 | 8 | 9 | (("->" @operator) (#set! conceal "")) 10 | (("fn" @keyword.function) (#set! conceal "")) 11 | 12 | (("use" @keyword) (#set! conceal "")) 13 | (("return" @keyword) (#set! conceal "")) 14 | (("break" @keyword) (#set! conceal "")) 15 | -------------------------------------------------------------------------------- /spell/en.utf-8.add: -------------------------------------------------------------------------------- 1 | LunarVim 2 | Neovim 3 | LunarVim's 4 | treesitter 5 | autopairs 6 | linters 7 | lunarvim 8 | nvim 9 | Edsger 10 | config 11 | config 12 | codicon 13 | nonicons 14 | stylua 15 | tsserver 16 | pyright 17 | vimls 18 | jsonls 19 | solang 20 | RubyGem 21 | lsp 22 | ABI 23 | healthcheck 24 | chris 25 | fnm 26 | Ethereum 27 | dapps 28 | nodejs 29 | Hardat 30 | frontend 31 | Fullstack 32 | blockchain 33 | web3 34 | dapp 35 | Metamask 36 | ethereum 37 | fullstack 38 | testnet 39 | ETH 40 | frontends 41 | JSON 42 | metamask 43 | Ok 44 | js 45 | chainId 46 | Flexbox 47 | lightningpolar 48 | github 49 | AppImage 50 | CentOS 51 | Archwiki 52 | io 53 | RINKEBY 54 | url 55 | coingecko 56 | uniswap 57 | css 58 | Netlify 59 | Rinkeby 60 | rinkeby 61 | etherscan 62 | systray 63 | MachWM 64 | shiftview 65 | dragmfact 66 | focusonnetactive 67 | localhost 68 | api 69 | serverless 70 | TODO 71 | vercel 72 | udev 73 | JUnit 74 | statusline 75 | Lualine 76 | lightline 77 | galaxyline 78 | kek 79 | catppuccin 80 | -------------------------------------------------------------------------------- /spell/en.utf-8.add.spl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TarunDaCoder/BobVim/207313a2f81703b971567e004dcb7bdfa3dd7d73/spell/en.utf-8.add.spl -------------------------------------------------------------------------------- /startup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | get_time() { 4 | tail -1 tmp | cut -d ' ' -f 1 5 | } 6 | 7 | pf() { 8 | printf '%s : ' "$@" 9 | } 10 | 11 | echo "Warmup #1" ; nvim 12 | echo "Warmup #2" ; nvim 13 | 14 | pf "No config" 15 | nvim -nu NORC --startuptime tmp; get_time 16 | 17 | pf "With config" 18 | nvim --startuptime tmp; get_time 19 | 20 | pf "Fastest config" 21 | nvim -nu "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/init.lua" --startuptime tmp; get_time 22 | 23 | pf "Opening init.lua" 24 | nvim "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/init.lua" --startuptime tmp; get_time 25 | 26 | pf "Opening Python file" 27 | nvim tmp.py --startuptime tmp; get_time 28 | 29 | pf "Opening C File" 30 | nvim tmp.c --startuptime tmp; get_time 31 | 32 | pf "Opening Norg file" 33 | nvim tmp.norg --startuptime tmp; get_time 34 | 35 | rm tmp 36 | -------------------------------------------------------------------------------- /stylua.toml: -------------------------------------------------------------------------------- 1 | indent_width = 4 2 | indent_type = 'Tabs' 3 | quote_style = 'AutoPreferSingle' 4 | line_endings = "Unix" 5 | no_call_parentheses = false 6 | --------------------------------------------------------------------------------