repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

neovim: added formatting and styling via stylua

bf8b356b2b1e63ebaf8b73c50810f87ffda01b7f

Oliver Krylow <o.krylow@isp-insoft.de> ·

unsigned

Browse filesCompare with HEAD

Changed files (25)

neovim/.styluaignore

Added
new file mode 100644
1 +plugin/packer_compiled.lua

neovim/init.lua

Modified
21 21 -- - highlights and groups => use plugin colorbuddy
23 23 -- import `dump` into the global namespace, so that we can use it in a running vim instance: `:lua Dump(vim.fn)`
24 -Dump = require("dump")
24 +-- selene: allow(unscoped_variables, unused_variable)
25 +Dump = require 'dump'
25 26 -- Define some standard path locations where we will put stuff into.
26 27 -- `data` is for persistent data like logs, backups and file states.
27 28 -- `config` is for configuration code itself and plugins.
28 29 -- `cache` is for fleeting, temporary data.
29 -local data_path = vim.fn.stdpath("data")
30 +local data_path = vim.fn.stdpath 'data'
30 31 -- local config_path = vim.fn.stdpath 'config'
31 32 -- local cache_path = vim.fn.stdpath 'cache'
33 -local autocommand = require("autocommand")
34 +local autocommand = require 'autocommand'
35 36 -- My cheatsheet is an initial buffer (if none was specified) where I put stuff to remember/learn.
36 37 -- Keybinds, commands, todos are all fair game.
37 -local cheatsheet = require("cheatsheet").print
38 -local setup_cheatsheet = require("cheatsheet").setup
39 -cheatsheet("")
40 -cheatsheet("Stuff for bugabinga to remember about NeoVim")
41 -cheatsheet("")
42 -local settings = require("general_editor_settings")
38 +local cheatsheet = require('cheatsheet').print
39 +local setup_cheatsheet = require('cheatsheet').setup
40 +cheatsheet ''
41 +cheatsheet 'Stuff for bugabinga to remember about NeoVim'
42 +cheatsheet ''
43 +local settings = require 'general_editor_settings'
43 44 settings(autocommand, data_path)
45 46 -- setup my custom tabline
46 -local setup_tabline = require("tabline").setup
47 +local setup_tabline = require('tabline').setup
47 48 setup_tabline()
49 50 -- setup my custom statusline
50 -local setup_statusline = require("statusline").setup
51 +local setup_statusline = require('statusline').setup
51 52 setup_statusline(autocommand)
53 54 -- setup my own keybindings
54 -require("keybinds")(cheatsheet)
55 +require 'keybinds'(cheatsheet)
56 57 -- some file specific settings
57 -require("filetype.yaml")(autocommand)
58 -require("filetype.ansi_c")(autocommand)
59 -local setup_mkdir = require("mkdir").setup
58 +require 'filetype.yaml'(autocommand)
60 +local setup_mkdir = require('mkdir').setup
60 61 setup_mkdir(autocommand)
62 63 -- Load nvim plugins
63 64 -- when started with '--headless', there will be no attached UIs
64 65 local non_interactive = #vim.api.nvim_list_uis() == 0
65 66 -- Load the plugins module into the global namespace in order to reference them later in keymaps
66 -Plugins = require("plugins")(data_path, non_interactive)
67 +-- selene: allow(unscoped_variables, unused_variable)
68 +Plugins = require 'plugins'(data_path, non_interactive)
67 69 -- Lazy load the plugin manager packer, when using these commands
68 70 -- cheatsheet':PluginsInstall => Install the specified plugins if they are not already installed'
69 -vim.cmd([[command! PluginsInstall packadd packer.nvim | lua Plugins.install()]])
71 +vim.cmd [[command! PluginsInstall packadd packer.nvim | lua Plugins.install()]]
70 72 -- cheatsheet':PluginsUpdate => Update the specified plugins, installing any that are missing'
71 -vim.cmd([[command! PluginsUpdate packadd packer.nvim | lua Plugins.update()]])
72 -cheatsheet(":PluginsSync => Perform a clean followed by an update")
73 -vim.cmd([[command! PluginsSync packadd packer.nvim | lua Plugins.sync()]])
73 +vim.cmd [[command! PluginsUpdate packadd packer.nvim | lua Plugins.update()]]
74 +cheatsheet ':PluginsSync => Perform a clean followed by an update'
75 +vim.cmd [[command! PluginsSync packadd packer.nvim | lua Plugins.sync()]]
74 76 -- cheatsheet':PluginsClean => Remove any disabled or no longer managed plugins'
75 -vim.cmd([[command! PluginsClean packadd packer.nvim | lua Plugins.clean()]])
77 +vim.cmd [[command! PluginsClean packadd packer.nvim | lua Plugins.clean()]]
76 78 -- cheatsheet':PluginsCompile => Compile lazy-loader code and save to path'
77 -vim.cmd([[command! PluginsCompile packadd packer.nvim | lua Plugins.compile()]])
78 -cheatsheet(":PluginsProfile => Show the measured startup times of plugins")
79 -vim.cmd([[command! PluginsProfile packadd packer.nvim | lua Plugins.profile_output()]])
80 -vim.cmd([[command! PluginsStatus packadd packer.nvim | lua Plugins.status()]])
82 -autocommand({
83 - compile_lazy_plugin_loading_script_on_save = "BufWritePost plugins.lua source <afile> | PluginsCompile",
84 -})
86 -cheatsheet("")
87 -cheatsheet("Drawing ASCII diagrams with venn.nvim:")
88 -cheatsheet("Activate visual edit: `:set virtualedit=all`")
89 -cheatsheet("Select blocks: `<C-v>`")
90 -cheatsheet("Invoke `:Vbox`")
79 +vim.cmd [[command! PluginsCompile packadd packer.nvim | lua Plugins.compile()]]
80 +cheatsheet ':PluginsProfile => Show the measured startup times of plugins'
81 +vim.cmd [[command! PluginsProfile packadd packer.nvim | lua Plugins.profile_output()]]
82 +vim.cmd [[command! PluginsStatus packadd packer.nvim | lua Plugins.status()]]
92 84 -- Should be the last call
93 85 setup_cheatsheet()

neovim/justfile

Added
new file mode 100644
1 +set shell := ["nu", "--commands"]
3 +default:
4 + @just --list
6 +check:
7 + selene .
9 +format:
10 + stylua .

neovim/lua/autocommand.lua

Modified
2 2 -- This function creates a custom API over autocommands in nvim.
3 3 -- Since an official API is not present yet, I simply stole one from norcalli.
4 4 -- groups: a map of group name to list of vimscript commands (table of string), or a single vimscript command (string).
5 5 return function(autocmd_groups)
6 - for name, commands in pairs(autocmd_groups) do
7 - -- wrap autocommands in a group and..
8 - vim.cmd('augroup ' .. name)
9 - -- ... undefine the groups commands, so that they become idempotent.
10 - -- This prevents nvim from reexecuting these when reloading the configuration.
11 - vim.cmd 'autocmd!'
12 - if type(commands) == 'string' then
13 - vim.cmd('autocmd ' .. commands)
14 - elseif type(commands) == 'table' then
15 - for _, command in ipairs(commands) do
16 - vim.cmd('autocmd ' .. command)
17 - end
18 - end
19 - vim.cmd 'augroup END'
20 - end
6 + for name, commands in pairs(autocmd_groups) do
7 + -- wrap autocommands in a group and..
8 + vim.cmd('augroup ' .. name)
9 + -- ... undefine the groups commands, so that they become idempotent.
10 + -- This prevents nvim from reexecuting these when reloading the configuration.
11 + vim.cmd 'autocmd!'
12 + if type(commands) == 'string' then
13 + vim.cmd('autocmd ' .. commands)
14 + elseif type(commands) == 'table' then
15 + for _, command in ipairs(commands) do
16 + vim.cmd('autocmd ' .. command)
17 + end
18 + end
19 + vim.cmd 'augroup END'
20 + end

neovim/lua/cheatsheet.lua

Modified
5 5 -- Throughout the configuration code, this function is expected to be called and given lines of text to display.
6 6 -- The second one sets up the custom intro screen, if nvim was started without any arguments.
8 -local cheatsheet_lines = { "CHEATSHEET VIM COMMANDS" }
8 +local cheatsheet_lines = { 'CHEATSHEET VIM COMMANDS' }
9 9 local is_setup = false
11 11 return {
12 12 print = function(message)
13 13 table.insert(cheatsheet_lines, message)
14 - if is_setup and vim.api.nvim_buf_get_name(0):match("cheatsheet") then
15 - vim.cmd([[noautocmd setlocal modifiable]])
14 + if is_setup and vim.api.nvim_buf_get_name(0):match 'cheatsheet' then
15 + vim.cmd [[noautocmd setlocal modifiable]]
16 16 -- Adds message by appending to the end of current buffer
17 17 vim.api.nvim_buf_set_lines(0, -1, -1, false, { message })
18 - vim.cmd([[noautocmd setlocal nomodifiable nomodified]])
18 + vim.cmd [[noautocmd setlocal nomodifiable nomodified]]
20 20 end,
21 21 setup = function()
23 23 -- program arguments were given
24 24 vim.fn.argc() ~= 0
25 25 -- the buffer is not empty
26 - or vim.fn.line2byte("$") ~= -1
26 + or vim.fn.line2byte '$' ~= -1
27 27 -- vim is already in insert mode
28 28 or vim.o.insertmode
29 29 -- buffer is not modifiable
33 33 return
35 35 -- disables the default intro screen
36 - vim.o.shortmess = vim.o.shortmess .. "I"
36 + vim.o.shortmess = vim.o.shortmess .. 'I'
37 37 -- ignore all autocommand event while we setup our start screen
38 - vim.o.eventignore = "all"
39 - vim.cmd(
40 - [[noautocmd silent! setlocal bufhidden=wipe colorcolumn= foldcolumn=0 matchpairs= nobuflisted nocursorcolumn nocursorline nolist nonumber norelativenumber nospell noswapfile signcolumn=no synmaxcol& statusline=cheatsheet filetype=intro]]
41 - )
38 + vim.o.eventignore = 'all'
39 + vim.cmd [[noautocmd silent! setlocal bufhidden=wipe colorcolumn= foldcolumn=0 matchpairs= nobuflisted nocursorcolumn nocursorline nolist nonumber norelativenumber nospell noswapfile signcolumn=no synmaxcol& statusline=cheatsheet filetype=intro]]
42 40 -- add lines here to buffer
43 - vim.api.nvim_buf_set_name(0, "cheatsheet")
41 + vim.api.nvim_buf_set_name(0, 'cheatsheet')
44 42 vim.api.nvim_buf_set_lines(0, 0, #cheatsheet_lines, false, cheatsheet_lines)
45 - vim.cmd([[noautocmd setlocal nomodifiable nomodified]])
46 - vim.cmd([[silent! %foldopen!]])
47 - vim.cmd([[normal! zb]])
43 + vim.cmd [[noautocmd setlocal nomodifiable nomodified]]
44 + vim.cmd [[silent! %foldopen!]]
45 + vim.cmd [[normal! zb]]
48 46 -- when entering insert mode, open new buffer
49 - vim.cmd([[nnoremap <buffer><nowait><silent> i :enew <bar> startinsert<cr>]])
50 - vim.o.eventignore = ""
47 + vim.cmd [[nnoremap <buffer><nowait><silent> i :enew <bar> startinsert<cr>]]
48 + vim.o.eventignore = ''
52 50 -- remember if the cheatsheet was already set up, so that the messenger function can instead modify the buffer
53 51 is_setup = true

neovim/lua/dump.lua

Modified
4 4 -- This function prints the contents of any lua value into the vim output command stream.
5 5 -- It is meant to aid in debugging and understanding the state of a running Vim instance.
6 6 -- As such it should be imported into the global namespace `_G`, if one wishes to use it
7 7 -- live.
8 8 -- In essence, this is a shorter way to write: `print(vim.inspect(...))`
9 9 return function(...)
10 - -- vim.inspect converts lua values to something human readable
11 - local objects = vim.tbl_map(vim.inspect, { ... })
12 - print(unpack(objects))
10 + -- vim.inspect converts lua values to something human readable
11 + local objects = vim.tbl_map(vim.inspect, { ... })
12 + print(unpack(objects))

neovim/lua/filetype/ansi_c.lua

Deleted
deleted file mode 100644
1 -return function(autocommand)
2 -end

neovim/lua/filetype/yaml.lua

Modified
1 1 return function(autocommand)
2 - -- YAML is very whitespace-sensite
3 - autocommand{yaml_settings = [[ FileType yaml setlocal tabstop=2 softtabstop=2 shiftwidth=2 ]]}
2 + -- YAML is very whitespace-sensite
3 + autocommand { yaml_settings = [[ FileType yaml setlocal tabstop=2 softtabstop=2 shiftwidth=2 ]] }
4 4 end

neovim/lua/general_editor_settings.lua

Modified
28 28 -- integrate Nushell with nvim
29 29 -- all nushell builtins (ls, sys, etc.) print their output with escape codes, which nvim cannot parse.
30 30 -- only time will tell if this will annoy me so much as to change it...
31 - vim.opt.shell = "nu"
32 - vim.opt.shellcmdflag = "--no-history --commands"
33 - vim.opt.shellpipe = "| save %s"
34 - vim.opt.shellredir = "| save %s"
35 - vim.opt.shellquote = ""
36 - vim.opt.shellxquote = ""
31 + vim.opt.shell = 'nu'
32 + vim.opt.shellcmdflag = '--no-history --commands'
33 + vim.opt.shellpipe = '| save %s'
34 + vim.opt.shellredir = '| save %s'
35 + vim.opt.shellquote = ''
36 + vim.opt.shellxquote = ''
37 37 -- insert whitespace type based on whitespace on previous line
38 38 vim.opt.smarttab = true
39 39 vim.opt.hlsearch = true
43 43 vim.opt.showmatch = true
44 44 vim.opt.hidden = true
45 45 -- Show the effects of substitutions incrementally
46 - vim.opt.inccommand = "nosplit"
46 + vim.opt.inccommand = 'nosplit'
47 47 -- enable mouse support, in a terminal app... i know crazy...
48 - vim.opt.mouse = "a"
48 + vim.opt.mouse = 'a'
49 49 -- use ripgrep instead of grep
50 - vim.opt.grepprg = "rg --vimgrep --no-heading --smart-case"
51 - vim.opt.grepformat = "%f:%1:%c:%m"
50 + vim.opt.grepprg = 'rg --vimgrep --no-heading --smart-case'
51 + vim.opt.grepformat = '%f:%1:%c:%m'
52 52 -- Show certain whitespace characters
53 - vim.opt.listchars = { tab = "⯈ ", trail = " ", nbsp = "␠", extends = "⋯", precedes = "⋯", space = "⸱" }
53 + vim.opt.listchars = { tab = '⯈ ', trail = ' ', nbsp = '␠', extends = '⋯', precedes = '⋯', space = '⸱' }
54 54 vim.opt.scrolloff = 3
55 55 -- make navigation from start of line to end of previous line more natural
56 - vim.opt.whichwrap:append("<>hl")
56 + vim.opt.whichwrap:append '<>hl'
57 57 -- do not spam the cmdline with every little input
58 58 vim.opt.showcmd = false
59 - vim.opt.wildmode = "list:longest"
59 + vim.opt.wildmode = 'list:longest'
60 60 -- Set the current working directory to the parent of the active buffer
61 61 vim.opt.autochdir = true
62 62 -- Keep track of file changes outside of vim
64 64 -- Make backups of all touched files in a special directory
65 65 vim.opt.backup = true
66 66 vim.opt.writebackup = true
67 - vim.opt.backupcopy = "auto"
67 + vim.opt.backupcopy = 'auto'
68 68 -- The magic slash at the end is important.
69 69 -- It tells vim to use the absolute path in encoded form as the backup file
70 70 -- name.
71 - vim.opt.backupdir = data_path .. "/backup/"
71 + vim.opt.backupdir = data_path .. '/backup/'
72 72 if vim.fn.empty(vim.fn.glob(vim.o.backupdir)) > 0 then
73 - vim.fn.mkdir(vim.o.backupdir, "p")
73 + vim.fn.mkdir(vim.o.backupdir, 'p')
75 - autocommand({
75 + autocommand {
76 76 backup_timestamp = [[BufWritePre * lua vim.opt.backupext = '@' .. vim.fn.strftime("%F.%H:%M") .. '.bak']],
77 - })
77 + }
78 78 -- set global swap directory, so that swap files do not pollute my workspace
79 - vim.opt.directory = data_path .. "/swap/"
79 + vim.opt.directory = data_path .. '/swap/'
80 80 -- persit undo states across vim restarts
81 81 vim.opt.undofile = true
82 - vim.opt.undodir = data_path .. "/undo/"
82 + vim.opt.undodir = data_path .. '/undo/'
83 83 -- ask me to force failed commands
84 84 vim.opt.confirm = true
85 - vim.opt.completeopt = { "menuone", "noinsert", "noselect" }
85 + vim.opt.completeopt = { 'menuone', 'noinsert', 'noselect' }
86 86 -- avoid showing messages during automomplete
87 - vim.opt.shortmess:append("c")
87 + vim.opt.shortmess:append 'c'
88 88 -- open splits below and to the right of current buffers
89 89 vim.opt.splitbelow = true
90 90 vim.opt.splitright = true
91 91 -- always show the signcolumn, because i don't like jumpy UIs
92 - vim.opt.signcolumn = "yes"
92 + vim.opt.signcolumn = 'yes'
93 93 -- Use true colors
94 94 vim.opt.termguicolors = true
95 95 vim.opt.lazyredraw = true
96 - vim.opt.guifont = "JetBrainsMono Nerd Font:h14:1"
96 + vim.opt.guifont = 'JetBrainsMono Nerd Font:h14:1'
97 97 -- Set cursor position to last known position, when entering a window
98 - autocommand({
98 + autocommand {
99 99 restore_cursor_position = [[ BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g`\"" | endif ]],
100 - })
101 101 -- Automatically enter and leave insert mode when opening/closing terminal buffers.
102 - autocommand({
102 + autocommand {
103 103 auto_enter_insert_on_terminal = {
104 104 [[TermOpen,TermEnter * startinsert]],
105 105 [[TermClose,TermLeave * stopinsert]],
107 - })
108 108 -- briefly highlight yanked text
109 - autocommand({
109 + autocommand {
110 110 highlight_yanked_text = [[TextYankPost * silent! lua vim.highlight.on_yank()]],
111 - })
112 112 -- Disable some built-in plugins we don't want
113 113 local disabled_built_ins = {
114 - "netrw",
115 - "netrwPlugin",
116 - "netrwSettings",
117 - "netrwFileHandlers",
118 - "gzip",
119 - "zip",
120 - "zipPlugin",
121 - "tar",
122 - "tarPlugin",
123 - "getscript",
124 - "getscriptPlugin",
125 - "vimball",
126 - "vimballPlugin",
127 - "2html_plugin",
128 - "logipat",
129 - "rrhelper",
130 - "spellfile_plugin",
131 - "matchit"
114 + 'netrw',
115 + 'netrwPlugin',
116 + 'netrwSettings',
117 + 'netrwFileHandlers',
118 + 'gzip',
119 + 'zip',
120 + 'zipPlugin',
121 + 'tar',
122 + 'tarPlugin',
123 + 'getscript',
124 + 'getscriptPlugin',
125 + 'vimball',
126 + 'vimballPlugin',
127 + '2html_plugin',
128 + 'logipat',
129 + 'rrhelper',
130 + 'spellfile_plugin',
131 + 'matchit',
133 133 for _, built_in in ipairs(disabled_built_ins) do
134 - vim.g["loaded_" .. built_in] = 1
134 + vim.g['loaded_' .. built_in] = 1

neovim/lua/keybinds.lua

Modified
4 4 -- Set up all my favorite keybindings and list them in my cheatsheet.
5 5 -- This module assumes a lot of pre configured state, i.e. already installed and enabled plugins.
6 6 -- The benefit of assembling all keybinds here is, that they are easy to find.
7 7 -- But unfortunataly, by collecting them here, they are placed "far" from their logical place, i.e. the plugins configuration.
8 8 return function(cheatsheet)
9 9 -- Let the <LEADER> key be <SPACE>
10 - vim.g.mapleader = " "
11 - cheatsheet("")
12 - cheatsheet("The LEADER key is SPACE! Press it to show all bindings.")
13 - cheatsheet("")
10 + vim.g.mapleader = ' '
11 + cheatsheet ''
12 + cheatsheet 'The LEADER key is SPACE! Press it to show all bindings.'
13 + cheatsheet ''
15 - local keys = require("which-key")
15 + local keys = require 'which-key'
17 17 --Open up a URL under the cursor
18 - local opener_program = ""
19 - if vim.fn.has("mac") == 1 then
20 - opener_program = "open"
21 - elseif vim.fn.has("unix") == 1 then
22 - opener_program = "xdg-open"
23 - elseif vim.fn.has("win32") == 1 then
24 - opener_program = "explorer"
18 + local opener_program = ''
19 + if vim.fn.has 'mac' == 1 then
20 + opener_program = 'open'
21 + elseif vim.fn.has 'unix' == 1 then
22 + opener_program = 'xdg-open'
23 + elseif vim.fn.has 'win32' == 1 then
24 + opener_program = 'explorer'
25 25 else
26 26 -- What should we do on unknown platforms? We guess...
27 - opener_program = "firefox"
27 + opener_program = 'firefox'
30 30 -- bundle all mappings under LEADER here
31 31 keys.register({
32 - ["<F9>"] = { [[<CMD>tabnew $MYVIMRC<CR>]], "Open Nvim Configuration" },
33 - ["<F10>"] = { [[<CMD>PluginsSync<CR>]], "Sync Plugins" },
34 - ["<F11>"] = { [[<CMD>PluginsCompile<CR>]], "Compile Plugins" },
32 + ['<F9>'] = { [[<CMD>tabnew $MYVIMRC<CR>]], 'Open Nvim Configuration' },
33 + ['<F10>'] = { [[<CMD>PluginsSync<CR>]], 'Sync Plugins' },
34 + ['<F11>'] = { [[<CMD>PluginsCompile<CR>]], 'Compile Plugins' },
35 35 f = {
36 - name = "File Operations",
37 - f = { [[<CMD>Telescope find_files<CR>]], "Find File" },
38 - b = { [[<CMD>Telescope buffers<CR>]], "Open a Buffer" },
39 - r = { [[<CMD>Telescope oldfiles<CR>]], "Open Recent File" },
40 - e = { [[<CMD>NvimTreeToggle<CR>]], "Toggle File Explorer" },
36 + name = 'File Operations',
37 + f = { [[<CMD>Telescope find_files<CR>]], 'Find File' },
38 + b = { [[<CMD>Telescope buffers<CR>]], 'Open a Buffer' },
39 + r = { [[<CMD>Telescope oldfiles<CR>]], 'Open Recent File' },
40 + e = { [[<CMD>NvimTreeToggle<CR>]], 'Toggle File Explorer' },
42 42 g = {
43 - name = "Goto Navigation",
44 - T = { [[<CMD>TroubleToggle<CR>]], "Toggle Trouble Window" },
43 + name = 'Goto Navigation',
44 + T = { [[<CMD>TroubleToggle<CR>]], 'Toggle Trouble Window' },
45 45 x = {
46 46 "<CMD>lua require'spawn'('" .. opener_program .. "',{vim.fn.expand('<cfile>')})<CR>",
47 - "Open Url Under Cursor",
47 + 'Open Url Under Cursor',
50 50 a = {
51 - name = "Code Operations",
52 - O = { [[<CMD>SymbolsOutline<CR>]], "Toggle Outline" },
51 + name = 'Code Operations',
52 + O = { [[<CMD>SymbolsOutline<CR>]], 'Toggle Outline' },
54 54 }, {
55 - prefix = "<LEADER>",
55 + prefix = '<LEADER>',
58 - cheatsheet("")
59 - cheatsheet("ALT + j => Move line(s) down")
60 - cheatsheet("ALT + k => Move line(s) up")
58 + cheatsheet ''
59 + cheatsheet 'ALT + j => Move line(s) down'
60 + cheatsheet 'ALT + k => Move line(s) up'
61 + keys.register {
62 + ['<A-j>'] = { [[<CMD>move .+1<CR>==]], 'Move Current Line(s) Up' },
63 + ['<A-k>'] = { [[<CMD>move .-2<CR>==]], 'Move Current Line(s) Down' },
64 + }
61 65 keys.register({
62 - ["<A-j>"] = { [[<CMD>move .+1<CR>==]], "Move Current Line(s) Up" },
63 - ["<A-k>"] = { [[<CMD>move .-2<CR>==]], "Move Current Line(s) Down" },
66 + ['<A-j>'] = { [[<ESC><CMD>move .+1<CR>==gi]], 'Move Current Line(s) Up' },
67 + ['<A-k>'] = { [[<ESC><CMD>move .-2<CR>==gi]], 'Move Current Line(s) Down' },
68 + }, {
69 + mode = 'i',
65 71 keys.register({
66 - ["<A-j>"] = { [[<ESC><CMD>move .+1<CR>==gi]], "Move Current Line(s) Up" },
67 - ["<A-k>"] = { [[<ESC><CMD>move .-2<CR>==gi]], "Move Current Line(s) Down" },
72 + ['<A-j>'] = { [[<ESC><CMD>'<,'>move'>+1<CR>gv=gv]], 'Move Current Line(s) Up' },
73 + ['<A-k>'] = { [[<ESC><CMD>'<,'>move'<-2<CR>gv=gv]], 'Move Current Line(s) Down' },
68 74 }, {
69 - mode = "i",
70 - })
71 - keys.register({
72 - ["<A-j>"] = { [[<ESC><CMD>'<,'>move'>+1<CR>gv=gv]], "Move Current Line(s) Up" },
73 - ["<A-k>"] = { [[<ESC><CMD>'<,'>move'<-2<CR>gv=gv]], "Move Current Line(s) Down" },
74 - }, {
75 - mode = "x",
75 + mode = 'x',
78 78 -- Change behaviour of :terminal to be less like a vim buffer and more what I am used to
78 78 return vim.api.nvim_replace_termcodes(string, true, true, true)
80 80 keys.register({
81 - ["<ESC>"] = { escape([[<C-\><C-n>]]), "Escape terminal mode" },
82 - ["<C-w>"] = { [[<ESC><C-w>]], "Delete Word" },
83 - ["<A-1>"] = { [[<CMD>lua require'FTerm'.toggle()<CR>]], "Toggle the Terminal" },
81 + ['<ESC>'] = { escape [[<C-\><C-n>]], 'Escape terminal mode' },
82 + ['<C-w>'] = { [[<ESC><C-w>]], 'Delete Word' },
83 + ['<A-1>'] = { [[<CMD>lua require'FTerm'.toggle()<CR>]], 'Toggle the Terminal' },
84 84 }, {
85 - mode = "t",
86 - })
87 - cheatsheet("")
88 - cheatsheet("ALT + 1 => Toggle the Terminal")
89 - cheatsheet("")
90 - keys.register({
91 - ["<A-1>"] = { [[<CMD>lua require'FTerm'.toggle()<CR>]], "Toggle the Terminal" },
85 + mode = 't',
87 + cheatsheet ''
88 + cheatsheet 'ALT + 1 => Toggle the Terminal'
89 + cheatsheet ''
90 + keys.register {
91 + ['<A-1>'] = { [[<CMD>lua require'FTerm'.toggle()<CR>]], 'Toggle the Terminal' },
92 + }
94 94 -- Clear highlighted search results whenever ESC is hit
95 - keys.register({ ["<ESC>"] = { [[<CMD>nohlsearch<CR>]], "Clear Highlighted Text" } })
95 + keys.register { ['<ESC>'] = { [[<CMD>nohlsearch<CR>]], 'Clear Highlighted Text' } }

neovim/lua/lsp.lua

Modified
2 2 -- This function configures all the LSP clients that i might care about.
3 3 -- It is expected to be called in the 'config' step of the 'lspconfig' plugin.
4 4 -- autocommand: function, that can create autocmds
5 5 return function()
6 - local integrate_into_neovim = function(client, buffer_number)
7 - print("LSP " .. client.name .. " [" .. client.id .. "] " .. "started.")
6 + -- enable lsp-powered auto-completion
7 + local cmp = require 'cmp'
8 + local types = require 'cmp.types'
9 + cmp.setup {
10 + snippet = {
11 + expand = function(arguments)
12 + require('snippy').expand_snippet(arguments.body)
13 + end,
14 + },
15 + completion = {
16 + autocomplete = false,
17 + },
18 + confirmation = { default_behaviour = types.cmp.ConfirmBehavior.Insert },
19 + mapping = {
20 + ['<C-d>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }),
21 + ['<C-f>'] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }),
22 + ['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
23 + ['<C-y>'] = cmp.config.disable,
24 + ['<C-e>'] = cmp.mapping {
25 + i = cmp.mapping.abort(),
26 + c = cmp.mapping.close(),
27 + },
28 + ['<CR>'] = cmp.mapping.confirm { select = true },
29 + },
30 + formatting = {
31 + format = function(_, vim_item)
32 + -- adds icons into the completion ui
33 + vim_item.kind = require('lspkind').presets.default[vim_item.kind]
34 + return vim_item
35 + end,
36 + },
37 + sources = {
38 + { name = 'nvim_lsp' },
39 + { name = 'snippy' },
40 + { name = 'nvim_lua' }, -- FIXME: this source only makes sense in neovim lua files...
41 + { name = 'buffer' },
42 + { name = 'path' },
43 + { name = 'emoji' },
44 + { name = 'calc' },
45 + },
46 + }
9 - -- enable lsp-powered auto-completion
10 - local cmp = require("cmp")
11 - local types = require("cmp.types")
12 - -- adds icons into the completion ui
13 - local lspkind = require("lspkind")
14 - -- TODO define snippets in some other file...
15 - local snippets = require("snippets")
16 - cmp.setup({
17 - snippet = {
18 - expand = function(arguments)
19 - --FIXME no clue if this actually does something..
20 - snippets.lookup_snippet(vim.o.filetype, arguments.body)
21 - end,
48 + cmp.setup.cmdline('/', {
49 + sources = {
50 + { name = 'buffer' },
51 + },
52 + })
54 + cmp.setup.cmdline(':', {
55 + sources = cmp.config.sources {
56 + { { name = 'path' } },
57 + { { name = 'cmdline' } },
58 + },
59 + })
61 + local keybinds_in_lsp_context = {
62 + g = {
63 + name = 'Goto Navigation',
64 + ['D'] = { [[<CMD>lua vim.lsp.buf.declaration()<CR>]], 'Goto Declaration' },
65 + ['d'] = { [[<CMD>lua vim.lsp.buf.definition()<CR>]], 'Goto Definition' },
66 + ['i'] = { [[<CMD>lua vim.lsp.buf.implementation()<CR>]], 'Goto Implementation' },
67 + ['t'] = { [[<CMD>lua vim.lsp.buf.type_definition()<CR>]], 'Goto Type Definition' },
68 + ['w'] = { [[<CMD>lua vim.lsp.buf.document_symbol()<CR>]], 'Goto Document Symbol' },
69 + ['W'] = { [[<CMD>lua vim.lsp.buf.workspace_symbol()<CR>]], 'Goto Workspace Symbol' },
70 + ['n'] = { [[<CMD>lua vim.lsp.diagnostic.goto_next()<CR>]], 'Goto Next Diagnostic' },
71 + ['N'] = { [[<CMD>lua vim.lsp.diagnostic.goto_prev()<CR>]], 'Goto Previous Diagnostic' },
72 + },
73 + a = {
74 + name = 'Code Operations',
75 + ['h'] = { [[<CMD>lua vim.lsp.buf.hover()<CR>]], 'Show Hover' },
76 + ['d'] = {
77 + [[<CMD>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>]],
78 + 'Show Diagnostics on Current Line',
23 - completion = {
24 - autocomplete = false,
25 - },
26 - confirmation = { default_behaviour = types.cmp.ConfirmBehavior.Insert },
27 - mapping = {
28 - ["<C-d>"] = cmp.mapping.scroll_docs(-4),
29 - ["<C-f>"] = cmp.mapping.scroll_docs(4),
30 - ["<C-n>"] = cmp.mapping.complete(),
31 - ["<C-j>"] = cmp.mapping.select_next_item(),
32 - ["<C-k>"] = cmp.mapping.select_prev_item(),
33 - ["<C-e>"] = cmp.mapping.abort(),
34 - ["<C-y>"] = cmp.mapping.confirm({ select = true }),
35 - },
36 - formatting = {
37 - format = function(_, vim_item)
38 - vim_item.kind = lspkind.presets.default[vim_item.kind]
39 - return vim_item
40 - end,
41 - },
42 - sources = {
43 - { name = "nvim_lsp" },
44 - { name = "nvim_lua" }, -- this source only makes sense in neovim lua files...
45 - { name = "buffer" },
46 - { name = "path" },
47 - { name = "emoji" },
48 - { name = "calc" },
49 - },
50 - })
80 + ['s'] = { [[<CMD>lua vim.lsp.buf.signature_help()<CR>]], 'Show Signature Help' },
81 + ['f'] = { [[<CMD>lua vim.lsp.buf.code_action()<CR>]], 'Code Actions...' },
82 + ['r'] = { [[<CMD>lua vim.lsp.buf.rename()<CR>]], 'Rename' },
83 + ['='] = { [[<CMD>lua vim.lsp.buf.formatting()<CR>]], 'Format' },
85 + ['R'] = { [[<CMD>lua vim.lsp.buf.references()<CR>]], 'Show References' },
86 + ['i'] = { [[<CMD>lua vim.lsp.buf.incoming_calls()<CR>]], 'Show Incoming Calls' },
87 + ['o'] = { [[<CMD>lua vim.lsp.buf.outgoing_calls()<CR>]], 'Show Outgoind Calls' },
88 + },
89 + }
91 + local integrate_into_neovim = function(client, buffer_number)
92 + print('LSP ' .. client.name .. ' [' .. client.id .. '] ' .. 'started.')
51 94 -- Configure diagnostics to only show up on file save
52 - vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
95 + vim.lsp.handlers['textDocument/publishDiagnostics'] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
53 96 signs = true,
54 97 underline = false,
55 98 virtual_text = false,
58 101 -- TODO
59 102 -- * clear diagnostics on enter i
61 - local keys = require("which-key")
62 - keys.register({
63 - g = {
64 - name = "Goto Navigation",
65 - ["D"] = { [[<CMD>lua vim.lsp.buf.declaration()<CR>]], "Goto Declaration" },
66 - ["d"] = { [[<CMD>lua vim.lsp.buf.definition()<CR>]], "Goto Definition" },
67 - ["i"] = { [[<CMD>lua vim.lsp.buf.implementation()<CR>]], "Goto Implementation" },
68 - ["t"] = { [[<CMD>lua vim.lsp.buf.type_definition()<CR>]], "Goto Type Definition" },
69 - ["w"] = { [[<CMD>lua vim.lsp.buf.document_symbol()<CR>]], "Goto Document Symbol" },
70 - ["W"] = { [[<CMD>lua vim.lsp.buf.workspace_symbol()<CR>]], "Goto Workspace Symbol" },
71 - ["n"] = { [[<CMD>lua vim.lsp.diagnostic.goto_next()<CR>]], "Goto Next Diagnostic" },
72 - ["N"] = { [[<CMD>lua vim.lsp.diagnostic.goto_prev()<CR>]], "Goto Previous Diagnostic" },
73 - },
74 - a = {
75 - name = "Code Operations",
76 - ["h"] = { [[<CMD>lua vim.lsp.buf.hover()<CR>]], "Show Hover" },
77 - ["d"] = {
78 - [[<CMD>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>]],
79 - "Show Diagnostics on Current Line",
80 - },
81 - ["s"] = { [[<CMD>lua vim.lsp.buf.signature_help()<CR>]], "Show Signature Help" },
82 - ["f"] = { [[<CMD>lua vim.lsp.buf.code_action()<CR>]], "Code Actions..." },
83 - ["r"] = { [[<CMD>lua vim.lsp.buf.rename()<CR>]], "Rename" },
84 - ["="] = { [[<CMD>lua vim.lsp.buf.formatting()<CR>]], "Format" },
86 - ["R"] = { [[<CMD>lua vim.lsp.buf.references()<CR>]], "Show References" },
87 - ["i"] = { [[<CMD>lua vim.lsp.buf.incoming_calls()<CR>]], "Show Incoming Calls" },
88 - ["o"] = { [[<CMD>lua vim.lsp.buf.outgoing_calls()<CR>]], "Show Outgoind Calls" },
89 - },
90 - }, {
91 - prefix = "<LEADER>",
104 + local keys = require 'which-key'
105 + keys.register(keybinds_in_lsp_context, {
106 + prefix = '<LEADER>',
92 107 buffer = buffer_number,
96 - local lsp = require("lspconfig")
111 + local lsp = require 'lspconfig'
98 113 local capabilities = vim.lsp.protocol.make_client_capabilities()
99 - capabilities = require("cmp_nvim_lsp").update_capabilities(capabilities)
114 + capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
101 116 -- Nvim lua configuration LSP
102 - local neovim_runtime_path = vim.split(package.path, ";")
103 - table.insert(neovim_runtime_path, "lua/?.lua")
104 - table.insert(neovim_runtime_path, "lua/?/init.lua")
117 + local neovim_runtime_path = vim.split(package.path, ';')
118 + table.insert(neovim_runtime_path, 'lua/?.lua')
119 + table.insert(neovim_runtime_path, 'lua/?/init.lua')
106 - local system_name
107 - if vim.fn.has("mac") == 1 then
108 - system_name = "macOS"
109 - elseif vim.fn.has("unix") == 1 then
110 - system_name = "Linux"
111 - elseif vim.fn.has("win32") == 1 then
112 - system_name = "Windows"
113 - else
114 - print("Unsupported system for sumneko")
115 - end
116 121 local neovim_lua_library = {}
117 122 for _, path in pairs(vim.api.nvim_list_runtime_paths()) do
118 - local lua_path = path .. "/lua/"
123 + local lua_path = path .. '/lua/'
119 124 if vim.fn.isdirectory(lua_path) then
120 125 neovim_lua_library[lua_path] = true
123 - local sumneko_home = "~/Workspace/lua-language-server"
124 - if system_name == "Windows" then
125 - sumneko_home = "W:/misc/lua-language-server"
129 + local system_name
130 + if vim.fn.has 'mac' == 1 then
131 + system_name = 'macOS'
132 + elseif vim.fn.has 'unix' == 1 then
133 + system_name = 'Linux'
134 + elseif vim.fn.has 'win32' == 1 then
135 + system_name = 'Windows'
136 + else
137 + print 'Unsupported system for sumneko'
138 + end
139 + local sumneko_home = '~/Workspace/lua-language-server'
140 + if system_name == 'Windows' then
141 + sumneko_home = 'W:/misc/lua-language-server'
127 143 -- This loads the `lua` files from nvim into the runtime.
128 - neovim_lua_library[vim.fn.expand("$VIMRUNTIME/lua")] = true
144 + neovim_lua_library[vim.fn.expand '$VIMRUNTIME/lua'] = true
129 145 --TODO: How to switch this configuration based upon if we are editing neovim configuration or just any Lua file/project?
130 - lsp.sumneko_lua.setup({
146 + lsp.sumneko_lua.setup {
131 147 on_attach = integrate_into_neovim,
132 148 capabilites = capabilities,
133 149 cmd = {
134 - sumneko_home .. "/bin/" .. system_name .. "/lua-language-server",
135 - "-E",
136 - "-W",
137 - sumneko_home .. "/main.lua",
150 + sumneko_home .. '/bin/' .. system_name .. '/lua-language-server',
151 + '-E',
152 + '-W',
153 + sumneko_home .. '/main.lua',
139 155 settings = {
140 156 Lua = {
141 157 runtime = {
142 - version = "LuaJIT",
158 + version = 'LuaJIT',
143 159 path = neovim_runtime_path,
145 161 diagnostics = {
146 162 enable = true,
147 - disable = "trailing-space",
148 - globals = { "vim", "_G", "Dump" },
163 + disable = 'trailing-space',
164 + globals = { 'vim', '_G', 'Dump' },
150 166 hint = {
151 167 enable = true,
163 - })
165 181 -- Markdown Notes (Zettelkasten) LSP
166 - lsp.zeta_note.setup({
182 + lsp.zeta_note.setup {
167 183 on_attach = integrate_into_neovim,
168 184 capabilites = capabilities,
169 - cmd = { "zeta-note" },
170 - })
185 + cmd = { 'zeta-note' },
172 188 -- YAML LSP
173 - lsp.yamlls.setup({
189 + lsp.yamlls.setup {
174 190 on_attach = integrate_into_neovim,
175 191 capabilites = capabilities,
176 192 --FIXME: Only works on Windows
177 - cmd = { "yaml-language-server.cmd", "--stdio" },
193 + cmd = { 'yaml-language-server.cmd', '--stdio' },
178 194 root_dir = function()
179 195 return vim.fn.getcwd()
181 - })
183 199 -- Zig LSP
184 200 -- FIXME: ZLS is very tied to the specific version of the zig compiler one uses.
185 201 -- we need to build our own version for 0.8.0 because it is not done upstream yet
186 - lsp.zls.setup({
202 + lsp.zls.setup {
187 203 on_attach = integrate_into_neovim,
188 204 capabilites = capabilities,
189 - })
191 207 -- LLVM Clang LSP
192 - lsp.clangd.setup({
208 + lsp.clangd.setup {
193 209 on_attach = integrate_into_neovim,
194 210 capabilites = capabilities,
195 - })
197 213 -- Rust LSP
198 214 -- this will automatically start and configure nvim-lsp rust-analyzer
199 - require("rust-tools").setup({ server = {
215 + require('rust-tools').setup { server = {
200 216 on_attach = integrate_into_neovim,
201 217 capabilities = capabilities,
202 - } })
218 + } }
204 220 -- JSON LSP
205 - lsp.jsonls.setup({
221 + lsp.jsonls.setup {
206 222 on_attach = integrate_into_neovim,
207 223 capabilites = capabilities,
208 224 --FIXME: Only works on Windows
209 - cmd = { "vscode-json-language-server.cmd", "--stdio" },
225 + cmd = { 'vscode-json-language-server.cmd', '--stdio' },
210 226 commands = {
211 227 Format = {
212 228 -- Apply the ranged formatting to the whole file
213 229 function()
214 - vim.lsp.buf.range_formatting({}, { 0, 0 }, { vim.fn.line("$"), 0 })
230 + vim.lsp.buf.range_formatting({}, { 0, 0 }, { vim.fn.line '$', 0 })
218 - })
220 236 -- GraphViz Dot LSP
221 - lsp.dotls.setup({
237 + lsp.dotls.setup {
222 238 on_attach = integrate_into_neovim,
223 239 capabilites = capabilities,
224 - })
226 - -- Null-ls
227 - local nls = require'null-ls'
228 - nls.config{
229 - debug = false,
230 - -- Format: [CODE] MESSAGE (SOURCE)
231 - diagnostics_format = "[#{c}] #{m} (#{s})",
232 - sources = {
233 - nls.builtins.formatting.stylua,
234 - -- this is a nice linter, but wihtout configuration, it spews too much nonsense.
235 - -- one can define the stdlib for vim in a config file, but the builtin selene does not find the config file.
236 - -- this is a general issue with formatters/linters integrated into neovim.
237 - -- how should i handle this?
238 - -- write a function, that searches the path to root for a config file? (internal stylua behaviour)
239 - -- somehow make sure, that vim root folder is always correct...?
240 - -- nls.builtins.diagnostics.selene,
241 - },
242 - }
243 - lsp["null-ls"].setup({
244 - capabilites = capabilities,
245 - on_attach = integrate_into_neovim,
246 - })
242 + -- overwrite default action handlers with cuter ones
243 + vim.lsp.handlers['textDocument/codeAction'] = require('lsputil.codeAction').code_action_handler
244 + vim.lsp.handlers['textDocument/references'] = require('lsputil.locations').references_handler
245 + vim.lsp.handlers['textDocument/definition'] = require('lsputil.locations').definition_handler
246 + vim.lsp.handlers['textDocument/declaration'] = require('lsputil.locations').declaration_handler
247 + vim.lsp.handlers['textDocument/typeDefinition'] = require('lsputil.locations').typeDefinition_handler
248 + vim.lsp.handlers['textDocument/implementation'] = require('lsputil.locations').implementation_handler
249 + vim.lsp.handlers['textDocument/documentSymbol'] = require('lsputil.symbols').document_handler
250 + vim.lsp.handlers['workspace/symbol'] = require('lsputil.symbols').workspace_handler

neovim/lua/mkdir.lua

Modified
10 10 return {
11 11 run = function()
12 12 -- base directory of current buffer
13 - local directory = vim.fn.expand("%:p:h")
13 + local directory = vim.fn.expand '%:p:h'
14 14 if vim.fn.isdirectory(directory) == 0 then
15 - vim.fn.mkdir(directory, "p")
15 + vim.fn.mkdir(directory, 'p')
17 17 end,
18 18 setup = function(autocommand)
19 - autocommand({ setup_mkdir_before_save = [[ BufWritePre * lua require'mkdir'.run() ]] })
19 + autocommand { setup_mkdir_before_save = [[ BufWritePre * lua require'mkdir'.run() ]] }
20 20 end,

neovim/lua/plugins.lua

Modified
8 8 -- data_path:string => root directory into which packer can be installed, if not already done
9 9 -- non_interactive:boolean => wether to show a display when updating plugins or not. Typically set to true, when nvim is used for scripting.
10 10 return function(data_path, non_interactive)
11 - local plugin_package = "plugins"
11 + local plugin_package = 'plugins'
12 + local packer_bootstrap = false
12 13 -- packer will be loaded into the optionals folder and loaded later on demand by `packadd packer.nvim`
13 14 -- glob will normalize the path with respect to path separators.
14 15 -- mixing those seems to sometimes trip up packer, though the reason is unknown.
15 - local packer_installation_path = data_path .. "/site/pack/" .. plugin_package .. "/opt/packer.nvim"
16 - if vim.fn.empty(vim.fn.glob(packer_installation_path)) == 1 then
17 - vim.cmd('!git clone https://github.com/wbthomason/packer.nvim "' .. packer_installation_path .. '"')
18 - vim.cmd("packadd packer")
16 + local packer_installation_path = data_path .. '/site/pack/' .. plugin_package .. '/opt/packer.nvim'
17 + if vim.fn.empty(vim.fn.glob(packer_installation_path)) > 0 then
18 + packer_bootstrap = vim.fn.system {
19 + 'git',
20 + 'clone',
21 + '--depth',
22 + '1',
23 + 'https://github.com/wbthomason/packer.nvim',
24 + packer_installation_path,
25 + }
20 27 local packer = nil
21 28 local init = function()
22 29 -- lazy init the loading and configuration of packer
23 30 if packer == nil then
24 - packer = require("packer")
25 - packer.init({
31 + packer = require 'packer'
32 + packer.init {
26 33 -- Do not create vim commands, because we will create our own, that delegate to the plugins module
27 34 disable_commands = true,
28 35 plugin_package = plugin_package,
30 37 non_interactive = non_interactive,
32 39 profile = {
33 - enable = false,
40 + enable = true,
34 41 threshold = 1, -- the amount in ms that a plugins load time must be over for it to be included in the profile
36 - })
43 + }
38 45 local use = packer.use
39 46 -- reset packer in case we are reloading the whole configuration
40 47 packer.reset()
42 49 -- Packer can manage itself
43 - use({ "wbthomason/packer.nvim", opt = true })
50 + use { 'wbthomason/packer.nvim', opt = true }
45 52 -- Display popup with possible keybindings to a command
46 - use({
47 - "folke/which-key.nvim",
53 + use {
54 + 'folke/which-key.nvim',
48 55 config = function()
49 - local key_labels = { ["<SPACE>"] = "SPACE", ["<CR>"] = "ENTER", ["<TAB>"] = "TAB", ["."] = "DOT" }
56 + local key_labels = { ['<SPACE>'] = 'SPACE', ['<CR>'] = 'ENTER', ['<TAB>'] = 'TAB', ['.'] = 'DOT' }
50 57 for f_key_number = 1, 12 do
51 - key_labels["<F" .. f_key_number .. ">"] = "F" .. f_key_number
58 + key_labels['<F' .. f_key_number .. '>'] = 'F' .. f_key_number
54 - require("which-key").setup({
61 + require('which-key').setup {
55 62 marks = true,
56 63 registers = true,
57 64 spelling = { enabled = true, suggestions = 5 },
58 65 key_labels = key_labels,
59 - window = { border = "single" },
60 - })
66 + window = { border = 'single' },
67 + }
62 - })
69 + }
64 71 -- Pretty abstraction over quicklist, loclist, messages and lsp diagnostics
65 - use({
66 - "folke/trouble.nvim",
67 - cmd = { "Trouble", "TroubleClose", "TroubleRefresh", "TroubleToggle" },
72 + use {
73 + 'folke/trouble.nvim',
74 + cmd = { 'Trouble', 'TroubleClose', 'TroubleRefresh', 'TroubleToggle' },
68 75 requires = {
69 - { "kyazdani42/nvim-web-devicons", opt = true },
76 + { 'kyazdani42/nvim-web-devicons', opt = true },
70 77 -- patches in some highlighting groups for LSP diagnostics
71 78 -- FIXME should just be done by my theme instead of this plugin...
72 - { "folke/lsp-colors.nvim" },
79 + { 'folke/lsp-colors.nvim' },
74 81 config = function()
75 - require("trouble").setup()
76 - require("lsp-colors").setup({
77 - Error = "#f05faf",
78 - Warning = "#c0af68",
79 - Information = "#2db8cf",
80 - Hint = "#19bc90",
81 - })
82 + require('trouble').setup()
83 + require('lsp-colors').setup {
84 + Error = '#f05faf',
85 + Warning = '#c0af68',
86 + Information = '#2db8cf',
87 + Hint = '#19bc90',
88 + }
83 - })
85 - -- Treesitter syntax highlighting for justfiles
86 - use{"IndianBoy42/tree-sitter-just", config = function()
87 - require"tree-sitter-just".setup({["local"] = true})
88 - end}
90 + }
90 92 -- NVIM API for defining color schemes
91 - use({
92 - "tjdevries/colorbuddy.vim",
93 + use {
94 + 'tjdevries/colorbuddy.vim',
93 95 config = function()
94 - require("theme")(require("colorbuddy").setup())
96 + require 'theme'(require('colorbuddy').setup())
96 - })
98 + }
98 100 -- Advanced parsers for better syntax highlighting
99 - use({
100 - "nvim-treesitter/nvim-treesitter",
101 - requires = { "nvim-treesitter/nvim-treesitter-refactor" },
101 + use {
102 + 'nvim-treesitter/nvim-treesitter',
103 + requires = {
104 + 'nvim-treesitter/nvim-treesitter-refactor',
105 + -- Treesitter syntax highlighting for justfiles
106 + 'IndianBoy42/tree-sitter-just',
107 + },
102 108 config = function()
103 - require("nvim-treesitter.install").compilers = { "clang" }
104 - require("nvim-treesitter.configs").setup({
109 + require('nvim-treesitter.parsers').get_parser_configs().just = {
110 + install_info = {
111 + url = 'https://github.com/IndianBoy42/tree-sitter-just',
112 + files = { 'src/parser.c', 'src/scanner.cc' },
113 + branch = 'main',
114 + },
115 + maintainers = { '@IndianBoy42' },
117 + require('nvim-treesitter.install').compilers = { 'clang' }
118 + require('nvim-treesitter.configs').setup {
105 119 ensure_installed = {
106 - -- "zig",
107 - "java",
108 - "rust",
109 - "lua",
110 - "toml",
111 - "yaml",
112 - "json",
113 - "jsonc",
114 - "c",
115 - -- "comment",
116 - "html",
117 - "css",
118 - "javascript",
119 - "query",
120 - "vim",
120 + 'zig',
121 + 'java',
122 + 'rust',
123 + 'lua',
124 + 'toml',
125 + 'yaml',
126 + 'json',
127 + 'jsonc',
128 + 'c',
129 + 'comment',
130 + 'html',
131 + 'css',
132 + 'javascript',
133 + 'query',
134 + 'vim',
135 + 'just',
122 137 highlight = { enable = true },
123 138 incremental_selection = {
124 - enable = false,
139 + enable = true,
125 140 keymaps = {
126 - init_selection = "<C-Up>",
127 - node_incremental = "<C-Up>",
128 - node_decremental = "<C-Down>",
129 - scope_incremental = "<A-Up>",
141 + init_selection = '<C-Up>',
142 + node_incremental = '<C-Up>',
143 + node_decremental = '<C-Down>',
144 + scope_incremental = '<A-Up>',
132 - indent = { enable = false },
133 - query_linter = { enable = false, use_virtual_text = true, lint_events = { "BufWrite" } },
147 + indent = { enable = true },
148 + query_linter = { enable = true, use_virtual_text = true, lint_events = { 'BufWrite' } },
134 149 refactor = {
135 - highlight_definitions = { enable = false },
136 - smart_rename = { enable = false, keymaps = { smart_rename = "<LEADER>r" } },
150 + highlight_definitions = { enable = true },
151 + smart_rename = { enable = true, keymaps = { smart_rename = '<LEADER>fr' } },
137 152 navigation = {
138 - enable = false,
139 - keymaps = { goto_next_usage = "<a-.>", goto_previous_usage = "<a-,>" },
153 + enable = true,
154 + keymaps = { goto_next_usage = '<a-.>', goto_previous_usage = '<a-,>' },
142 - })
144 - })
146 161 -- Treesitter Playground
147 162 -- Show the treesitter parse tree.
148 163 -- Lint syntax errors
149 164 -- Show highlight groupsunder cursor
150 - use({
151 - "nvim-treesitter/playground",
165 + use {
166 + 'nvim-treesitter/playground',
152 167 config = function()
153 - local keys = require("which-key")
154 - keys.register({
155 - ["<space>."] = {
156 - "<CMD>TSHighlightCapturesUnderCursor<CR>",
157 - "Shows the highlight group under the cursor, when TreeSitter is used.",
168 + local keys = require 'which-key'
169 + keys.register {
170 + ['<space>.'] = {
171 + '<CMD>TSHighlightCapturesUnderCursor<CR>',
172 + 'Shows the highlight group under the cursor, when TreeSitter is used.',
159 - })
161 - })
163 178 -- Basic integration of ziglang
164 - use({ "ziglang/zig.vim", opt = true, ft = "zig" })
179 + use { 'ziglang/zig.vim', opt = true, ft = 'zig' }
166 181 -- Move around the buffer with easy motions
167 - use("phaazon/hop.nvim")
182 + use 'phaazon/hop.nvim'
169 184 -- Show the actual color of color codes and names
170 185 -- #f00 => red
171 186 -- #00ff00 => green
172 187 -- Blue => blue
174 - use({
175 - "norcalli/nvim-colorizer.lua",
189 + use {
190 + 'norcalli/nvim-colorizer.lua',
176 191 config = function()
177 - require("colorizer").setup()
192 + require('colorizer').setup()
179 - })
181 196 -- Type :<number> to jump to line numbers
182 - use({
183 - "nacro90/numb.nvim",
197 + use {
198 + 'nacro90/numb.nvim',
184 199 config = function()
185 - require("numb").setup({
200 + require('numb').setup {
186 201 show_numbers = false,
187 202 show_cursorline = true,
188 - })
190 - })
192 - -- null-ls is a plugin, that allows to code custom functions, that get exposed as a lsp server
193 - use({
194 - "jose-elias-alvarez/null-ls.nvim",
207 + -- plot srartuptime data from nvim
208 + use{'dstein64/vim-startuptime'}
210 + -- Preprepared collection of glue code for neovim lsp-client and thrid party lsp servers.
211 + use {
212 + 'neovim/nvim-lspconfig',
195 213 config = function()
196 - -- This will configure all LSPs not only Null-ls.
197 - -- But because Null-ls depends on lspconfig, we have to delay this
198 - require("lsp")()
199 - -- overwrite default action handlers with cuter ones
200 - vim.lsp.handlers["textDocument/codeAction"] = require("lsputil.codeAction").code_action_handler
201 - vim.lsp.handlers["textDocument/references"] = require("lsputil.locations").references_handler
202 - vim.lsp.handlers["textDocument/definition"] = require("lsputil.locations").definition_handler
203 - vim.lsp.handlers["textDocument/declaration"] = require("lsputil.locations").declaration_handler
204 - vim.lsp.handlers["textDocument/typeDefinition"] = require("lsputil.locations").typeDefinition_handler
205 - vim.lsp.handlers["textDocument/implementation"] = require("lsputil.locations").implementation_handler
206 - vim.lsp.handlers["textDocument/documentSymbol"] = require("lsputil.symbols").document_handler
207 - vim.lsp.handlers["workspace/symbol"] = require("lsputil.symbols").workspace_handler
214 + require 'lsp'()
209 216 requires = {
210 - -- dependecies of telescope
211 217 -- extensions to the std lib
212 - "nvim-lua/plenary.nvim",
218 + 'nvim-lua/plenary.nvim',
213 219 -- popup windows
214 - "nvim-lua/popup.nvim",
220 + 'nvim-lua/popup.nvim',
215 221 -- Fuzzy matcher
216 - "nvim-telescope/telescope.nvim",
222 + 'nvim-telescope/telescope.nvim',
217 223 -- debugging adapter -- like LSP but for debuggers
218 - "mfussenegger/nvim-dap",
224 + 'mfussenegger/nvim-dap',
219 225 -- advanced rust integration
220 - "simrat39/rust-tools.nvim",
221 - -- Preprepared collection of glue code for neovim lsp-client and thrid party lsp servers.
222 - "neovim/nvim-lspconfig",
226 + 'simrat39/rust-tools.nvim',
223 227 -- Completions support, that integrates advanced nvim features (LSP+treesitter)
224 - "norcalli/snippets.nvim",
225 - "hrsh7th/cmp-buffer",
226 - "hrsh7th/cmp-calc",
227 - "hrsh7th/cmp-emoji",
228 - "hrsh7th/cmp-path",
229 - "hrsh7th/cmp-nvim-lsp",
230 - "hrsh7th/cmp-nvim-lua",
231 - "hrsh7th/nvim-cmp",
228 + 'dcampos/nvim-snippy',
229 + 'dcampos/cmp-snippy',
230 + -- autocomplete framework with LSP support
231 + 'hrsh7th/cmp-buffer',
232 + 'hrsh7th/cmp-calc',
233 + 'hrsh7th/cmp-emoji',
234 + 'hrsh7th/cmp-path',
235 + 'hrsh7th/cmp-nvim-lsp',
236 + 'hrsh7th/cmp-nvim-lua',
237 + 'hrsh7th/cmp-cmdline',
238 + 'hrsh7th/nvim-cmp',
232 239 -- Icons for completion UI
233 - "onsails/lspkind-nvim",
240 + 'onsails/lspkind-nvim',
234 241 -- dependency of nvim-lsputils
235 - "RishabhRD/popfix",
242 + 'RishabhRD/popfix',
236 243 -- collection of better handlers for lsp actions.
237 244 -- e.g. puts selection of code actions into floating window
238 - "RishabhRD/nvim-lsputils",
245 + 'RishabhRD/nvim-lsputils',
246 + -- Show outline view based on LSP
247 + 'simrat39/symbols-outline.nvim',
240 - })
242 - -- Deeper integration of JDTLS from Eclipse with nvim
243 - -- DO NOT use simultanously with jdtls from lspconfig!
244 - -- TODO: integrate with nvim-dap debugger
245 - -- use { 'mfussenegger/nvim-jdtls', opt = true }
246 - --
248 251 -- comment and uncomment lines
249 - use({ "b3nj5m1n/kommentary" })
252 + use { 'b3nj5m1n/kommentary' }
251 254 -- smooth scrolling
252 255 -- Its possible Neovide will support smooth scrool soon: https://github.com/neovim/neovim/issues/15075
253 256 -- When it does, this plugin is redundant, if nvim runs in Neovide.
254 - use({
255 - "karb94/neoscroll.nvim",
257 + use {
258 + 'karb94/neoscroll.nvim',
256 259 config = function()
257 - require("neoscroll").setup({
260 + -- if not vim.g.neovide then
261 + require('neoscroll').setup {
258 262 -- All these keys will be mapped. Pass an empty table ({}) for no mappings
259 - mappings = { "<C-u>", "<C-d>", "<C-b>", "<C-f>", "<C-y>", "<C-e>", "zt", "zz", "zb" },
263 + mappings = { '<C-u>', '<C-d>', '<C-b>', '<C-f>', '<C-y>', '<C-e>', 'zt', 'zz', 'zb' },
260 264 hide_cursor = true, -- Hide cursor while scrolling
261 265 stop_eof = true, -- Stop at <EOF> when scrolling downwards
262 266 respect_scrolloff = false, -- Stop scrolling when the cursor reaches the scrolloff margin of the file
263 267 cursor_scrolls_alone = true, -- The cursor will keep on scrolling even if the window cannot scroll further
264 - easing_function = "circular", -- Interpolation of scroll animation steps
265 - })
268 + easing_function = 'circular', -- Interpolation of scroll animation steps
270 + -- end
267 - })
269 - -- ASCII diagram drawing
270 - use({
271 - "jbyuki/venn.nvim",
272 - opt = true,
273 - command = "VBox",
274 - })
276 - -- Show outline view based on LSP
277 - use({ "simrat39/symbols-outline.nvim" })
279 274 -- Make using terminals in Neovim more comfortable
280 - use({
281 - "numtostr/FTerm.nvim",
275 + use {
276 + 'numtostr/FTerm.nvim',
282 277 config = function()
283 - require("FTerm").setup({ cmd = "nu", border = "single" })
278 + require('FTerm').setup { cmd = 'nu', border = 'single' }
285 - })
287 - use({ 'NoahTheDuke/vim-just' })
289 282 -- automatically size splits reasonably
290 - use({
291 - "beauwilliams/focus.nvim",
283 + use {
284 + 'beauwilliams/focus.nvim',
292 285 config = function()
293 - local focus = require("focus")
286 + local focus = require 'focus'
294 287 focus.signcolumn = false
296 - })
290 + end
292 + -- if packer was initially installed, issue a Sync command to automatically install plugins
293 + if packer_bootstrap then
294 + packer.sync()
299 297 -- the plugin module always delegates to packer, ensuring that at all times init configures packer correctly

neovim/lua/spawn.lua

Modified
2 2 -- Fires a one-off process, that is intended to run some programm, independently of nvim.
3 3 -- The process is opened asynchronously and detached from the nvim process.
4 4 -- This is most useful for opening files or URLs, because no communication between nvim and the process is necessary.
5 5 return function(program, arguments)
6 - local handle = vim.loop.spawn(
7 - program,
8 - {
9 - args = arguments,
10 - -- Detach process from nvim so it does not get killed, when nvim closes
11 - detached = true,
12 - -- On Windows, hide the console window
13 - hide = true,
14 - })
15 - if(handle) then
16 - -- Break the process from its parent child relationship
17 - vim.loop.unref(handle)
18 - --Closing the handle now should not kill the process but free the ressource
19 - vim.loop.close(handle)
20 - else
21 - error('Could not start "' .. program .. '" ' .. table.concat(arguments, ' ') .. '.')
22 - end
6 + local handle = vim.loop.spawn(program, {
7 + args = arguments,
8 + -- Detach process from nvim so it does not get killed, when nvim closes
9 + detached = true,
10 + -- On Windows, hide the console window
11 + hide = true,
12 + })
13 + if handle then
14 + -- Break the process from its parent child relationship
15 + vim.loop.unref(handle)
16 + --Closing the handle now should not kill the process but free the ressource
17 + vim.loop.close(handle)
18 + else
19 + error('Could not start "' .. program .. '" ' .. table.concat(arguments, ' ') .. '.')
20 + end

neovim/lua/statusline.lua

Modified
1 -local branch_icon = ""
2 -local vcs_branch_name = ""
1 +local branch_icon = ''
2 +local vcs_branch_name = ''
3 3 local code_actions_count = 0
4 4 local special_windows = {
5 - intro = { "CheatSheet", "" },
6 - NvimTree = { "Files", "" },
7 - packer = { "Plugins", "" },
8 - help = { "Help", "龎" },
9 - [""] = { "unknown file type", "" },
5 + intro = { 'CheatSheet', '' },
6 + NvimTree = { 'Files', '' },
7 + packer = { 'Plugins', '' },
8 + help = { 'Help', '龎' },
9 + [''] = { 'unknown file type', '' },
11 -local lsp_symbols = { Error = "", Information = "", Warning = "", Hint = "" }
11 +local lsp_symbols = { Error = '', Information = '', Warning = '', Hint = '' }
13 13 local get_lsp_diagnostics_count = function()
14 - local diagnostics_count = ""
14 + local diagnostics_count = ''
15 15 for type, icon in pairs(lsp_symbols) do
16 16 local count = vim.lsp.diagnostic.get_count(0, type)
17 - local highlight = "%#LspDiagnosticsDefault" .. type .. "#"
18 - local rendered_count = count > 0 and highlight .. icon .. " " .. count .. " " or ""
17 + local highlight = '%#LspDiagnosticsDefault' .. type .. '#'
18 + local rendered_count = count > 0 and highlight .. icon .. ' ' .. count .. ' ' or ''
19 19 diagnostics_count = diagnostics_count .. rendered_count
21 21 return diagnostics_count
50 50 -- update the vcs branch name, if vcs is available
51 51 update_vcs_branch_name = function()
52 - if not pcall(require, "plenary") then
52 + if not pcall(require, 'plenary') then
53 53 return
55 - local Job = require("plenary.job")
56 - local git = Job:new({
57 - command = "git",
58 - args = { "branch", "--show-current" },
59 - cwd = vim.fn.expand("%:p:h"), -- parent directory of current buffer
55 + local Job = require 'plenary.job'
56 + local git = Job:new {
57 + command = 'git',
58 + args = { 'branch', '--show-current' },
59 + cwd = vim.fn.expand '%:p:h', -- parent directory of current buffer
60 60 maximum_results = 1,
61 61 skip_validation = true,
62 62 on_exit = function(output)
65 65 vcs_branch_name = result
68 - })
69 - local svn = Job:new({
70 - command = "svn",
71 - args = { "info" },
72 - cwd = vim.fn.expand("%:p:h"), -- parent directory of current buffer
68 + }
69 + local svn = Job:new {
70 + command = 'svn',
71 + args = { 'info' },
72 + cwd = vim.fn.expand '%:p:h', -- parent directory of current buffer
73 73 maximum_results = 4,
74 74 skip_validation = true,
75 75 on_exit = function(output)
76 76 local result = output:result()[4] -- Relative URL is on the 4th line
77 - result = result and result:match("Relative URL:%s%^/([%w/]+).*") or nil
77 + result = result and result:match 'Relative URL:%s%^/([%w/]+).*' or nil
78 78 if result then
79 79 vcs_branch_name = result
82 - })
82 + }
83 83 -- simply try all vcs tools at once, and trust that only one returns an answer successfully
84 84 local all = { git, svn }
85 85 for _, tool in pairs(all) do
91 91 local filetype = vim.bo.filetype
92 92 local special_window = special_windows[filetype]
93 93 if special_window then
94 - return "%#Statusline"
95 - .. (active and "" or "NC")
96 - .. "#%="
97 - .. special_window[2]
98 - .. " "
99 - .. special_window[1]
100 - .. "%="
94 + return '%#Statusline' .. (active and '' or 'NC') .. '#%=' .. special_window[2] .. ' ' .. special_window[1] .. '%='
102 - local edited = vim.bo.mod and "" or " "
103 - local modifiable = vim.bo.modifiable and " " or ""
96 + local edited = vim.bo.mod and '' or ' '
97 + local modifiable = vim.bo.modifiable and ' ' or ''
104 98 local diagnostics = get_lsp_diagnostics_count()
106 - local vcs_info = vcs_branch_name and ("%#LineNr#%=" .. branch_icon .. " " .. vcs_branch_name) or nil
100 + local vcs_info = vcs_branch_name and ('%#LineNr#%=' .. branch_icon .. ' ' .. vcs_branch_name) or nil
108 - local statusline = "%#Statusline"
109 - .. (active and "" or "NC")
110 - .. "#"
102 + local statusline = '%#Statusline'
103 + .. (active and '' or 'NC')
104 + .. '#'
111 105 .. edited
112 - .. " "
106 + .. ' '
113 107 .. modifiable
114 - .. " "
115 - .. "%F" -- full file path
116 - .. (active and (diagnostics ~= "" and "  " .. diagnostics .. "  " or " ") or " ")
117 - .. (code_actions_count ~= 0 and ("%#Title#" .. " " .. code_actions_count .. " ﯦ") or "")
118 - .. (active and vcs_info or "")
108 + .. ' '
109 + .. '%F' -- full file path
110 + .. (active and (diagnostics ~= '' and '  ' .. diagnostics .. '  ' or ' ') or ' ')
111 + .. (code_actions_count ~= 0 and ('%#Title#' .. ' ' .. code_actions_count .. ' ﯦ') or '')
112 + .. (active and vcs_info or '')
120 114 return statusline
122 116 -- setup a custom statusline
123 117 setup = function(autocommand)
124 - autocommand({
118 + autocommand {
125 119 -- TODO: is there a more clever way to synchronize getting the branch name and updating the statusline?
126 120 update_vcs_branch_name = "BufEnter,WinEnter,BufWinEnter,BufReadPost * lua require'statusline'.update_vcs_branch_name()",
127 121 update_code_actions_count = "CursorHold,CursorHoldI * lua require'statusline'.update_code_actions_count()",
128 122 update_statuslines = "CursorHold,CursorHoldI,BufEnter,WinEnter,BufWinEnter,BufReadPost * lua require'statusline'.update_statuslines()",
129 - })

neovim/lua/tabline.lua

Modified
7 7 -- gets a file icon based on extension and/or name
8 8 -- tries to use nvim-web-devicons, otherwise falls back to some default icon
9 -local get_icon = function(name, extension)
10 - if pcall(require, "nvim-web-devicons") then return require"nvim-web-devicons".get_icon(name ,extension, {default=true}) end
11 - return ""
9 +local get_icon = function(name, extension)
10 + if pcall(require, 'nvim-web-devicons') then
11 + return require('nvim-web-devicons').get_icon(name, extension, { default = true })
12 + end
13 + return ''
14 16 -- this function renders the tabline and is meant to be set as an expression into the `tabline` option
15 -return
16 - {
17 - render = function()
18 - local buffer_names_to_ignore = {'NvimTree'}
19 - local tabline = ""
20 - for _, current_tab in pairs(vim.api.nvim_list_tabpages()) do
21 - if vim.api.nvim_tabpage_is_valid(current_tab) then
22 - local current_window = vim.api.nvim_tabpage_get_win(current_tab)
23 - if not vim.api.nvim_win_is_valid(current_window) then goto continue end
24 - local current_buffer = vim.api.nvim_win_get_buf(current_window)
25 - if not (vim.api.nvim_buf_is_valid(current_buffer) and vim.api.nvim_buf_is_loaded(current_buffer)) then goto continue end
26 - local modified = vim.bo.modified and "" or " "
27 - -- we only care about the last part of the path
28 - local current_buffer_name = vim.api.nvim_buf_get_name(current_buffer)
29 - local stylish_buffer_name = current_buffer_name:match(".-([^\\/]-)$") or ""
30 - if vim.tbl_contains(buffer_names_to_ignore, stylish_buffer_name) then goto continue end
31 - local icon = ""
32 - if stylish_buffer_name == "" then
33 - stylish_buffer_name = "no name"
34 - icon = ""
35 - elseif stylish_buffer_name == "cheatsheet" then
36 - icon = ""
37 - else
38 - local extension = stylish_buffer_name:match("%w+%.(.+)")
39 - icon = get_icon(stylish_buffer_name, extension)
40 - end
41 - stylish_buffer_name = " " .. stylish_buffer_name .. " "
42 - local is_current_buffer = vim.api.nvim_get_current_buf() == current_buffer
43 - tabline = tabline .. "%#TabLine" ..
44 - (is_current_buffer and "Sel" or "") .. "#" ..
45 - " " .. icon .. stylish_buffer_name .. (is_current_buffer and modified or " ")
46 - end
47 - -- goto here to return early from one iteration step of the for loop
48 - ::continue::
49 - end
50 - return tabline .. "%#TabLineFill#"
51 -end,
52 - setup = function()
53 - -- set tabline to a custom rendering
54 - -- sets the tabline with some crazy vimscript syntax?
55 - -- my guess: this reevaluates this code snippet any time nvim requests a fresh tabline
56 - vim.opt.tabline = [[%!v:lua.require'tabline'.render()]]
57 -end
17 +return {
18 + render = function()
19 + local buffer_names_to_ignore = { 'NvimTree' }
20 + local tabline = ''
21 + for _, current_tab in pairs(vim.api.nvim_list_tabpages()) do
22 + if vim.api.nvim_tabpage_is_valid(current_tab) then
23 + local current_window = vim.api.nvim_tabpage_get_win(current_tab)
24 + if not vim.api.nvim_win_is_valid(current_window) then
25 + goto continue
26 + end
27 + local current_buffer = vim.api.nvim_win_get_buf(current_window)
28 + if not (vim.api.nvim_buf_is_valid(current_buffer) and vim.api.nvim_buf_is_loaded(current_buffer)) then
29 + goto continue
30 + end
31 + local modified = vim.bo.modified and '' or ' '
32 + -- we only care about the last part of the path
33 + local current_buffer_name = vim.api.nvim_buf_get_name(current_buffer)
34 + local stylish_buffer_name = current_buffer_name:match '.-([^\\/]-)$' or ''
35 + if vim.tbl_contains(buffer_names_to_ignore, stylish_buffer_name) then
36 + goto continue
37 + end
38 + local icon = ''
39 + if stylish_buffer_name == '' then
40 + stylish_buffer_name = 'no name'
41 + icon = ''
42 + elseif stylish_buffer_name == 'cheatsheet' then
43 + icon = ''
44 + else
45 + local extension = stylish_buffer_name:match '%w+%.(.+)'
46 + icon = get_icon(stylish_buffer_name, extension)
47 + end
48 + stylish_buffer_name = ' ' .. stylish_buffer_name .. ' '
49 + local is_current_buffer = vim.api.nvim_get_current_buf() == current_buffer
50 + tabline = tabline
51 + .. '%#TabLine'
52 + .. (is_current_buffer and 'Sel' or '')
53 + .. '#'
54 + .. ' '
55 + .. icon
56 + .. stylish_buffer_name
57 + .. (is_current_buffer and modified or ' ')
58 + end
59 + -- goto here to return early from one iteration step of the for loop
60 + ::continue::
61 + end
62 + return tabline .. '%#TabLineFill#'
63 + end,
64 + setup = function()
65 + -- set tabline to a custom rendering
66 + -- sets the tabline with some crazy vimscript syntax?
67 + -- my guess: this reevaluates this code snippet any time nvim requests a fresh tabline
68 + vim.opt.tabline = [[%!v:lua.require'tabline'.render()]]
69 + end,

neovim/lua/theme/init.lua

Modified
3 3 return function(Color, colors, Group, groups, styles)
4 4 -- TODO: manage background light and dark
6 6 -- let us first create some colors, that will later be mapped to highlight groups
7 7 -- these will be saved in the `colors` table
8 - Color.new("important", "#e0e0e0")
9 - Color.new("normal", "#adadad")
10 - Color.new("minor", "#7c7c7c")
11 - Color.new("nonessential", "#4f4f4f")
8 + Color.new('important', '#e0e0e0')
9 + Color.new('normal', '#adadad')
10 + Color.new('minor', '#7c7c7c')
11 + Color.new('nonessential', '#4f4f4f')
13 - Color.new("error", "#e080a8")
14 - Color.new("warning", "#e0d996")
15 - Color.new("information", "#69cde0")
13 + Color.new('error', '#e080a8')
14 + Color.new('warning', '#e0d996')
15 + Color.new('information', '#69cde0')
17 - Color.new("accent_strong", "#cfa1e6")
18 - Color.new("accent_weak", "#574461")
17 + Color.new('accent_strong', '#cfa1e6')
18 + Color.new('accent_weak', '#574461')
20 - Color.new("ui_normal", "#5e5e5e")
21 - Color.new("ui_important", "#78aba9")
22 - Color.new("ui_minor", "#547877")
20 + Color.new('ui_normal', '#5e5e5e')
21 + Color.new('ui_important', '#78aba9')
22 + Color.new('ui_minor', '#547877')
24 24 --intentionally ugly and easy to spot color, so that i can find out where it is used
25 - Color.new("debug", "#f111e1")
25 + Color.new('debug', '#f111e1')
27 27 -- TERMINAL COLORS
28 - vim.g.terminal_color_0 = "#555555"
29 - vim.g.terminal_color_1 = "#FB467B"
30 - vim.g.terminal_color_2 = "#B8EE92"
31 - vim.g.terminal_color_3 = "#FFCC00"
32 - vim.g.terminal_color_4 = "#56D6D6"
33 - vim.g.terminal_color_5 = "#B954B8"
34 - vim.g.terminal_color_6 = "#00D5A7"
35 - vim.g.terminal_color_7 = "#CED5E5"
36 - vim.g.terminal_color_8 = "5555555"
37 - vim.g.terminal_color_9 = "#FB467B"
38 - vim.g.terminal_color_10 = "#B8EE92"
39 - vim.g.terminal_color_11 = "#FFCC00"
40 - vim.g.terminal_color_12 = "#56D6D6"
41 - vim.g.terminal_color_13 = "#B954B8"
42 - vim.g.terminal_color_14 = "#00D5A7"
43 - vim.g.terminal_color_15 = "#CED5E5"
28 + vim.g.terminal_color_0 = '#555555'
29 + vim.g.terminal_color_1 = '#FB467B'
30 + vim.g.terminal_color_2 = '#B8EE92'
31 + vim.g.terminal_color_3 = '#FFCC00'
32 + vim.g.terminal_color_4 = '#56D6D6'
33 + vim.g.terminal_color_5 = '#B954B8'
34 + vim.g.terminal_color_6 = '#00D5A7'
35 + vim.g.terminal_color_7 = '#CED5E5'
36 + vim.g.terminal_color_8 = '5555555'
37 + vim.g.terminal_color_9 = '#FB467B'
38 + vim.g.terminal_color_10 = '#B8EE92'
39 + vim.g.terminal_color_11 = '#FFCC00'
40 + vim.g.terminal_color_12 = '#56D6D6'
41 + vim.g.terminal_color_13 = '#B954B8'
42 + vim.g.terminal_color_14 = '#00D5A7'
43 + vim.g.terminal_color_15 = '#CED5E5'
45 - require("theme.nvim_editor_colors")(Group, groups, colors, styles)
46 - require("theme.lsp_colors")(Group, groups, colors, styles)
47 - require("theme.treesitter_colors")(Group, groups, colors, styles)
45 + require 'theme.nvim_editor_colors'(Group, groups, colors, styles)
46 + require 'theme.lsp_colors'(Group, groups, colors, styles)
47 + require 'theme.treesitter_colors'(Group, groups, colors, styles)

neovim/lua/theme/lsp_colors.lua

Modified
1 1 return function(Group, groups, colors, styles)
2 - Group.new("LspDiagnosticsVirtualTextHint", colors.normal, colors.none, styles.NONE)
3 - Group.new("LspDiagnosticsSignWarning", colors.warning, colors.none, styles.NONE)
4 - Group.new("LspDiagnosticsSignInformation", colors.normal, colors.none, styles.NONE)
5 - Group.new("LspDiagnosticsSignHint", colors.normal, colors.none, styles.NONE)
6 - Group.new("LspDiagnosticsFloatingHint", colors.normal, colors.none, styles.underline)
7 - Group.new("LspDiagnosticsSignError", colors.error, colors.none, styles.NONE)
8 - Group.new("LspDiagnosticsDefaultWarning", colors.warning, colors.none, styles.NONE)
9 - Group.new("LspDiagnosticsDefaultError", colors.error, colors.none, styles.NONE)
10 - Group.new("LspDiagnosticsFloatingError", colors.error, colors.none, styles.underline)
11 - Group.new("LspDiagnosticsFloatingWarning", colors.warning, colors.none, styles.underline)
12 - Group.new("LspDiagnosticsFloatingInformation", colors.normal, colors.none, styles.underline)
13 - Group.new("LspDiagnosticsUnderlineInformation", colors.normal, colors.none, styles.underline)
14 - Group.new("LspDiagnosticsUnderlineHint", colors.normal, colors.none, styles.underline)
15 - Group.new("LspDiagnosticsDefaultInformation", colors.normal, colors.none, styles.NONE)
16 - Group.new("LspDiagnosticsDefaultHint", colors.normal, colors.none, styles.NONE)
17 - Group.new("LspDiagnosticsUnderlineError", colors.error, colors.none, styles.underline)
18 - Group.new("LspDiagnosticsVirtualTextError", colors.error, colors.none, styles.NONE)
19 - Group.new("LspDiagnosticsVirtualTextWarning", colors.normal, colors.none, styles.NONE)
20 - Group.new("LspDiagnosticsVirtualTextInformation", colors.normal, colors.none, styles.NONE)
21 - Group.new("LspDiagnosticsUnderlineWarning", colors.normal, colors.none, styles.underline)
2 + Group.new('LspDiagnosticsVirtualTextHint', colors.normal, colors.none, styles.NONE)
3 + Group.new('LspDiagnosticsSignWarning', colors.warning, colors.none, styles.NONE)
4 + Group.new('LspDiagnosticsSignInformation', colors.normal, colors.none, styles.NONE)
5 + Group.new('LspDiagnosticsSignHint', colors.normal, colors.none, styles.NONE)
6 + Group.new('LspDiagnosticsFloatingHint', colors.normal, colors.none, styles.underline)
7 + Group.new('LspDiagnosticsSignError', colors.error, colors.none, styles.NONE)
8 + Group.new('LspDiagnosticsDefaultWarning', colors.warning, colors.none, styles.NONE)
9 + Group.new('LspDiagnosticsDefaultError', groups.Error, groups.Error, groups.Error)
10 + Group.new('LspDiagnosticsFloatingError', colors.error, colors.none, styles.underline)
11 + Group.new('LspDiagnosticsFloatingWarning', colors.warning, colors.none, styles.underline)
12 + Group.new('LspDiagnosticsFloatingInformation', colors.normal, colors.none, styles.underline)
13 + Group.new('LspDiagnosticsUnderlineInformation', colors.normal, colors.none, styles.underline)
14 + Group.new('LspDiagnosticsUnderlineHint', colors.normal, colors.none, styles.underline)
15 + Group.new('LspDiagnosticsDefaultInformation', colors.normal, colors.none, styles.NONE)
16 + Group.new('LspDiagnosticsDefaultHint', colors.normal, colors.none, styles.NONE)
17 + Group.new('LspDiagnosticsUnderlineError', colors.error, colors.none, styles.underline)
18 + Group.new('LspDiagnosticsVirtualTextError', colors.error, colors.none, styles.NONE)
19 + Group.new('LspDiagnosticsVirtualTextWarning', colors.normal, colors.none, styles.NONE)
20 + Group.new('LspDiagnosticsVirtualTextInformation', colors.normal, colors.none, styles.NONE)
21 + Group.new('LspDiagnosticsUnderlineWarning', colors.normal, colors.none, styles.underline)

neovim/lua/theme/nvim_editor_colors.lua

Modified
1 1 return function(Group, groups, colors, styles)
2 2 -- SYNTAX
3 - Group.new("Normal", colors.normal, colors.none, styles.NONE)
4 - Group.new("NormalNC", colors.minor, colors.none, styles.NONE)
5 - Group.new("NormalFloat", colors.important, colors.none, styles.NONE)
3 + Group.new('Normal', colors.normal, colors.none, styles.NONE)
4 + Group.new('NormalNC', colors.minor, colors.none, styles.NONE)
5 + Group.new('NormalFloat', colors.important, colors.none, styles.NONE)
7 - Group.new("Comment", colors.important, colors.none, styles.bold + styles.italic)
7 + Group.new('Comment', colors.important, colors.none, styles.bold + styles.italic)
9 - Group.new("Constant", colors.normal, colors.none, styles.bold)
10 - Group.new("String", colors.normal, colors.none, styles.bold + styles.italic)
11 - Group.new("Character", groups.String, groups.String, groups.String)
12 - Group.new("Number", groups.String, groups.String, groups.String)
13 - Group.new("Float", groups.String, groups.String, groups.String)
14 - Group.new("Boolean", groups.String, groups.String, groups.String)
9 + Group.new('Constant', colors.normal, colors.none, styles.bold)
10 + Group.new('String', colors.normal, colors.none, styles.bold + styles.italic)
11 + Group.new('Character', groups.String, groups.String, groups.String)
12 + Group.new('Number', groups.String, groups.String, groups.String)
13 + Group.new('Float', groups.String, groups.String, groups.String)
14 + Group.new('Boolean', groups.String, groups.String, groups.String)
16 - Group.new("Identifier", colors.normal, colors.none, styles.none)
17 - Group.new("Function", groups.Identifier, groups.Identifier, groups.Identifier)
16 + Group.new('Identifier', colors.normal, colors.none, styles.none)
17 + Group.new('Function', groups.Identifier, groups.Identifier, groups.Identifier)
19 - Group.new("Statement", colors.minor, colors.none, styles.italic)
20 - Group.new("Conditional", groups.Statement, groups.Statement, groups.Statement)
21 - Group.new("Repeat", groups.Statement, groups.Statement, groups.Statement)
22 - Group.new("Label", groups.Statement, groups.Statement, groups.Statement + styles.underline)
23 - Group.new("Operator", groups.Statement, groups.Statement, groups.Statement)
24 - Group.new("Keyword", groups.Statement, groups.Statement, groups.Statement)
25 - Group.new("Exception", groups.Statement, groups.Statement, groups.Statement)
19 + Group.new('Statement', colors.minor, colors.none, styles.italic)
20 + Group.new('Conditional', groups.Statement, groups.Statement, groups.Statement)
21 + Group.new('Repeat', groups.Statement, groups.Statement, groups.Statement)
22 + Group.new('Label', groups.Statement, groups.Statement, groups.Statement + styles.underline)
23 + Group.new('Operator', groups.Statement, groups.Statement, groups.Statement)
24 + Group.new('Keyword', groups.Statement, groups.Statement, groups.Statement)
25 + Group.new('Exception', groups.Statement, groups.Statement, groups.Statement)
27 - Group.new("PreProc", groups.Statement, groups.Statement, groups.Statement)
28 - Group.new("Include", groups.PreProc, groups.PreProc, groups.PreProc)
29 - Group.new("Define", groups.PreProc, groups.PreProc, groups.PreProc)
30 - Group.new("Macro", groups.PreProc, groups.PreProc, groups.PreProc)
31 - Group.new("PreCondit", groups.PreProc, groups.PreProc, groups.PreProc)
27 + Group.new('PreProc', groups.Statement, groups.Statement, groups.Statement)
28 + Group.new('Include', groups.PreProc, groups.PreProc, groups.PreProc)
29 + Group.new('Define', groups.PreProc, groups.PreProc, groups.PreProc)
30 + Group.new('Macro', groups.PreProc, groups.PreProc, groups.PreProc)
31 + Group.new('PreCondit', groups.PreProc, groups.PreProc, groups.PreProc)
33 - Group.new("Type", colors.normal, colors.none, styles.bold)
34 - Group.new("StorageClass", groups.Statement, groups.Statement, groups.Statement)
35 - Group.new("Structure", groups.Statement, groups.Statement, groups.Statement)
36 - Group.new("Typedef", groups.Type, groups.Type, groups.Type)
33 + Group.new('Type', colors.normal, colors.none, styles.bold)
34 + Group.new('StorageClass', groups.Statement, groups.Statement, groups.Statement)
35 + Group.new('Structure', groups.Statement, groups.Statement, groups.Statement)
36 + Group.new('Typedef', groups.Type, groups.Type, groups.Type)
38 - Group.new("Special", colors.minor, colors.none, styles.NONE)
39 - Group.new("SpecialKey", colors.normal, colors.none, styles.italic)
40 - Group.new("SpecialComment", colors.accent_strong, colors.none, styles.bold)
41 - Group.new("Tag", groups.Special, groups.Special, groups.Special)
42 - Group.new("Delimiter", groups.Special, groups.Special, groups.Special)
43 - Group.new("Debug", groups.Special, groups.Special, groups.Special)
38 + Group.new('Special', colors.minor, colors.none, styles.NONE)
39 + Group.new('SpecialKey', colors.normal, colors.none, styles.italic)
40 + Group.new('SpecialComment', colors.accent_strong, colors.none, styles.bold)
41 + Group.new('Tag', groups.Special, groups.Special, groups.Special)
42 + Group.new('Delimiter', groups.Special, groups.Special, groups.Special)
43 + Group.new('Debug', groups.Special, groups.Special, groups.Special)
45 - Group.new("Underlined", colors.accent_strong, colors.none, styles.underline)
46 - Group.new("Ignore", colors.debug, colors.none, styles.NONE)
47 - Group.new("Error", colors.error, colors.none, styles.bold + styles.underline)
48 - Group.new("Todo", colors.accent_strong, colors.none, styles.bold + styles.underline)
45 + Group.new('Underlined', colors.accent_strong, colors.none, styles.underline)
46 + Group.new('Ignore', colors.debug, colors.none, styles.NONE)
47 + Group.new('Error', colors.error, colors.none, styles.bold + styles.underline)
48 + Group.new('Todo', colors.accent_strong, colors.none, styles.bold + styles.underline)
50 - Group.new("Whitespace", colors.nonessential, colors.none, styles.NONE)
51 - Group.new("NonText", colors.debug, colors.none, styles.NONE)
50 + Group.new('Whitespace', colors.nonessential, colors.none, styles.NONE)
51 + Group.new('NonText', colors.debug, colors.none, styles.NONE)
53 53 -- NVIM UI
54 - Group.new("NvimInternalError", colors.error, colors.none, styles.bold + styles.underline)
55 - Group.new("ErrorMsg", colors.error, colors.none, styles.bold)
56 - Group.new("WarningMsg", colors.warning, colors.none, styles.bold)
57 - Group.new("MoreMsg", colors.information, colors.none, styles.NONE)
58 - Group.new("ModeMsg", colors.information, colors.none, styles.NONE)
59 - Group.new("Question", colors.information, colors.none, styles.bold)
60 - Group.new("MsgSeparator", colors.ui_minor, colors.none, styles.NONE)
61 - Group.new("MsgArea", colors.ui_normal, colors.none, styles.NONE)
54 + Group.new('NvimInternalError', colors.error, colors.none, styles.bold + styles.underline)
55 + Group.new('ErrorMsg', colors.error, colors.none, styles.bold)
56 + Group.new('WarningMsg', colors.warning, colors.none, styles.bold)
57 + Group.new('MoreMsg', colors.information, colors.none, styles.NONE)
58 + Group.new('ModeMsg', colors.information, colors.none, styles.NONE)
59 + Group.new('Question', colors.information, colors.none, styles.bold)
60 + Group.new('MsgSeparator', colors.ui_minor, colors.none, styles.NONE)
61 + Group.new('MsgArea', colors.ui_normal, colors.none, styles.NONE)
63 - Group.new("EndOfBuffer", colors.nonessential, colors.none, styles.NONE)
64 - Group.new("LineNr", colors.nonessential, colors.none, styles.NONE)
65 - Group.new("CursorLineNr", colors.ui_normal, colors.none, styles.NONE)
66 - Group.new("CursorColumn", colors.none, colors.accent_weak, styles.NONE)
67 - Group.new("CursorLine", colors.none, colors.accent_weak, styles.NONE)
68 - Group.new("TermCursor", colors.none, colors.none, styles.inverse)
69 - Group.new("TermCursorNC", colors.none, colors.none, styles.NONE)
70 - Group.new("Cursor", colors.none, colors.none, styles.reverse)
71 - Group.new("lCursor", groups.Cursor, groups.Cursor, groups.Cursor)
72 - Group.new("ColorColumn", colors.none, colors.ui_normal, styles.NONE)
73 - Group.new("Visual", colors.accent_strong, colors.accent_weak, styles.NONE)
74 - Group.new("VisualNC", colors.accent_weak, colors.none, styles.NONE)
75 - Group.new("Conceal", colors.debug, colors.none, styles.NONE)
76 - Group.new("Substitute", colors.information, colors.none, styles.NONE)
77 - Group.new("MatchParen", colors.accent_strong, colors.none, styles.bold)
63 + Group.new('EndOfBuffer', colors.nonessential, colors.none, styles.NONE)
64 + Group.new('LineNr', colors.nonessential, colors.none, styles.NONE)
65 + Group.new('CursorLineNr', colors.ui_normal, colors.none, styles.NONE)
66 + Group.new('CursorColumn', colors.none, colors.accent_weak, styles.NONE)
67 + Group.new('CursorLine', colors.none, colors.accent_weak, styles.NONE)
68 + Group.new('TermCursor', colors.none, colors.none, styles.inverse)
69 + Group.new('TermCursorNC', colors.none, colors.none, styles.NONE)
70 + Group.new('Cursor', colors.none, colors.none, styles.reverse)
71 + Group.new('lCursor', groups.Cursor, groups.Cursor, groups.Cursor)
72 + Group.new('ColorColumn', colors.none, colors.ui_normal, styles.NONE)
73 + Group.new('Visual', colors.accent_strong, colors.accent_weak, styles.NONE)
74 + Group.new('VisualNC', colors.accent_weak, colors.none, styles.NONE)
75 + Group.new('Conceal', colors.debug, colors.none, styles.NONE)
76 + Group.new('Substitute', colors.information, colors.none, styles.NONE)
77 + Group.new('MatchParen', colors.accent_strong, colors.none, styles.bold)
79 - Group.new("Directory", colors.normal, colors.none, styles.bold)
80 - Group.new("Title", colors.ui_important, colors.none, styles.bold + styles.reverse)
79 + Group.new('Directory', colors.normal, colors.none, styles.bold)
80 + Group.new('Title', colors.ui_important, colors.none, styles.bold + styles.reverse)
82 - Group.new("IncSearch", colors.ui_important, colors.none, styles.underline)
83 - Group.new("Search", colors.important, colors.ui_important, styles.NONE)
84 - Group.new("VertSplit", colors.ui_normal, colors.none, styles.NONE)
85 - Group.new("WildMenu", colors.ui_normal, colors.none, styles.NONE)
86 - Group.new("Folded", colors.nonessential, colors.none, styles.NONE)
87 - Group.new("FoldColumn", colors.ui_minor, colors.none, styles.NONE)
88 - Group.new("SignColumn", colors.ui_minor, colors.none, styles.NONE)
89 - Group.new("StatusLine", colors.ui_minor, colors.none, styles.NONE)
90 - Group.new("StatusLineNC", colors.nonessential, colors.none, styles.NONE)
91 - Group.new("Pmenu", colors.ui_normal, colors.none, styles.NONE)
92 - Group.new("PmenuSel", colors.ui_important, colors.none, styles.underline)
93 - Group.new("PmenuSbar", colors.ui_minor, colors.none, styles.NONE)
94 - Group.new("PmenuThumb", colors.ui_important, colors.none, styles.NONE)
95 - Group.new("TabLine", colors.ui_normal, colors.none, styles.none)
96 - Group.new("TabLineSel", colors.ui_important, colors.none, styles.bold + styles.reverse)
97 - Group.new("TabLineFill", colors.none, colors.none, styles.NONE)
98 - Group.new("QuickFixLine", colors.ui_normal, colors.none, styles.NONE)
82 + Group.new('IncSearch', colors.ui_important, colors.none, styles.underline)
83 + Group.new('Search', colors.important, colors.ui_important, styles.NONE)
84 + Group.new('VertSplit', colors.ui_normal, colors.none, styles.NONE)
85 + Group.new('WildMenu', colors.ui_normal, colors.none, styles.NONE)
86 + Group.new('Folded', colors.nonessential, colors.none, styles.NONE)
87 + Group.new('FoldColumn', colors.ui_minor, colors.none, styles.NONE)
88 + Group.new('SignColumn', colors.ui_minor, colors.none, styles.NONE)
89 + Group.new('StatusLine', colors.ui_minor, colors.none, styles.NONE)
90 + Group.new('StatusLineNC', colors.nonessential, colors.none, styles.NONE)
91 + Group.new('Pmenu', colors.ui_normal, colors.none, styles.NONE)
92 + Group.new('PmenuSel', colors.ui_important, colors.none, styles.underline)
93 + Group.new('PmenuSbar', colors.ui_minor, colors.none, styles.NONE)
94 + Group.new('PmenuThumb', colors.ui_important, colors.none, styles.NONE)
95 + Group.new('TabLine', colors.ui_normal, colors.none, styles.none)
96 + Group.new('TabLineSel', colors.ui_important, colors.none, styles.bold + styles.reverse)
97 + Group.new('TabLineFill', colors.none, colors.none, styles.NONE)
98 + Group.new('QuickFixLine', colors.ui_normal, colors.none, styles.NONE)
100 - Group.new("SpellBad", colors.warning, colors.none, styles.undercurl)
101 - Group.new("SpellCap", colors.debug, colors.none, styles.NONE)
102 - Group.new("SpellRare", colors.debug, colors.none, styles.NONE)
103 - Group.new("SpellLocal", colors.debug, colors.none, styles.NONE)
100 + Group.new('SpellBad', colors.warning, colors.none, styles.undercurl)
101 + Group.new('SpellCap', colors.debug, colors.none, styles.NONE)
102 + Group.new('SpellRare', colors.debug, colors.none, styles.NONE)
103 + Group.new('SpellLocal', colors.debug, colors.none, styles.NONE)
105 - Group.new("RedrawDebugNormal", colors.debug, colors.none, styles.NONE)
106 - Group.new("RedrawDebugClear", colors.debug, colors.none, styles.NONE)
107 - Group.new("RedrawDebugComposed", colors.debug, colors.none, styles.NONE)
108 - Group.new("RedrawDebugRecompose", colors.debug, colors.none, styles.NONE)
105 + Group.new('RedrawDebugNormal', colors.debug, colors.none, styles.NONE)
106 + Group.new('RedrawDebugClear', colors.debug, colors.none, styles.NONE)
107 + Group.new('RedrawDebugComposed', colors.debug, colors.none, styles.NONE)
108 + Group.new('RedrawDebugRecompose', colors.debug, colors.none, styles.NONE)

neovim/lua/theme/treesitter_colors.lua

Modified
1 1 return function(Group, groups, colors, styles)
2 - Group.new("TSString", colors.normal, colors.none, styles.bold + styles.italic)
3 - Group.new("TSStringEscape", groups.TSString, colors.accent_weak, groups.TSString)
4 - Group.new("TSStringRegex", groups.TSString, colors.accent_weak, groups.TSString)
5 - Group.new("TSStringSpecial", groups.TSString, colors.debug, groups.TSString)
6 - Group.new("TSConstBuiltin", groups.TSString, groups.TSString, groups.TSString)
7 - Group.new("TSNumber", groups.TSString, groups.TSString, groups.TSString)
8 - Group.new("TSBoolean", groups.TSString, groups.TSString, groups.TSString)
9 - Group.new("TSFloat", groups.TSString, groups.TSString, groups.TSString)
10 - Group.new("TSCharacter", groups.TSString, groups.TSString, groups.TSString)
2 + Group.new('TSString', colors.normal, colors.none, styles.bold + styles.italic)
3 + Group.new('TSStringEscape', groups.TSString, colors.accent_weak, groups.TSString)
4 + Group.new('TSStringRegex', groups.TSString, colors.accent_weak, groups.TSString)
5 + Group.new('TSStringSpecial', groups.TSString, colors.debug, groups.TSString)
6 + Group.new('TSConstBuiltin', groups.TSString, groups.TSString, groups.TSString)
7 + Group.new('TSNumber', groups.TSString, groups.TSString, groups.TSString)
8 + Group.new('TSBoolean', groups.TSString, groups.TSString, groups.TSString)
9 + Group.new('TSFloat', groups.TSString, groups.TSString, groups.TSString)
10 + Group.new('TSCharacter', groups.TSString, groups.TSString, groups.TSString)
12 - Group.new("TSKeyword", colors.minor, colors.none, styles.NONE)
13 - Group.new("TSKeywordFunction", groups.TSKeyword, groups.TSKeyword, groups.TSKeyword)
14 - Group.new("TSKeywordOperator", groups.TSKeyword, groups.TSKeyword, groups.TSKeyword)
15 - Group.new("TSKeywordReturn", groups.TSKeyword, groups.TSKeyword, styles.bold + styles.underline)
16 - Group.new("TSConditional", groups.TSKeyword, groups.TSKeyword, groups.TSKeyword)
17 - Group.new("TSRepeat", groups.TSKeyword, groups.TSKeyword, groups.TSKeyword)
18 - Group.new("TSLabel", groups.TSKeyword, groups.TSKeyword, groups.TSKeyword + styles.bold)
19 - Group.new("TSException", groups.TSKeyword, groups.TSKeyword, groups.TSKeyword)
20 - Group.new("TSFuncMacro", groups.TSKeyword, groups.TSKeyword, groups.TSKeyword)
21 - Group.new("TSInclude", groups.TSKeyword, groups.TSKeyword, groups.TSKeyword)
12 + Group.new('TSKeyword', colors.minor, colors.none, styles.NONE)
13 + Group.new('TSKeywordFunction', groups.TSKeyword, groups.TSKeyword, groups.TSKeyword)
14 + Group.new('TSKeywordOperator', groups.TSKeyword, groups.TSKeyword, groups.TSKeyword)
15 + Group.new('TSKeywordReturn', groups.TSKeyword, groups.TSKeyword, styles.bold + styles.underline)
16 + Group.new('TSConditional', groups.TSKeyword, groups.TSKeyword, groups.TSKeyword)
17 + Group.new('TSRepeat', groups.TSKeyword, groups.TSKeyword, groups.TSKeyword)
18 + Group.new('TSLabel', groups.TSKeyword, groups.TSKeyword, groups.TSKeyword + styles.bold)
19 + Group.new('TSException', groups.TSKeyword, groups.TSKeyword, groups.TSKeyword)
20 + Group.new('TSFuncMacro', groups.TSKeyword, groups.TSKeyword, groups.TSKeyword)
21 + Group.new('TSInclude', groups.TSKeyword, groups.TSKeyword, groups.TSKeyword)
23 - Group.new("TSMethod", colors.normal, colors.none, styles.NONE)
23 + Group.new('TSMethod', colors.normal, colors.none, styles.NONE)
25 - Group.new("TSPunctBracket", colors.minor, colors.none, styles.NONE)
26 - Group.new("TSPunctDelimiter", groups.TSPunctBracket, groups.TSPunctBracket, groups.TSPunctBracket)
27 - Group.new("TSPunctSpecial", groups.TSPunctBracket, groups.TSPunctBracket, groups.TSPunctBracket)
28 - Group.new("TSOperator", groups.TSPunctBracket, groups.TSPunctBracket, groups.TSPunctBracket)
25 + Group.new('TSPunctBracket', colors.minor, colors.none, styles.NONE)
26 + Group.new('TSPunctDelimiter', groups.TSPunctBracket, groups.TSPunctBracket, groups.TSPunctBracket)
27 + Group.new('TSPunctSpecial', groups.TSPunctBracket, groups.TSPunctBracket, groups.TSPunctBracket)
28 + Group.new('TSOperator', groups.TSPunctBracket, groups.TSPunctBracket, groups.TSPunctBracket)
30 - Group.new("TSVariable", colors.normal, colors.none, styles.NONE)
30 + Group.new('TSVariable', colors.normal, colors.none, styles.NONE)
32 - Group.new("TSType", colors.normal, colors.none, styles.NONE)
33 - Group.new("TSTypeBuiltin", groups.TSType, groups.TSType, groups.TSType)
32 + Group.new('TSType', colors.normal, colors.none, styles.NONE)
33 + Group.new('TSTypeBuiltin', groups.TSType, groups.TSType, groups.TSType)
35 - Group.new("TSComment", colors.important, colors.none, styles.bold + styles.italic)
35 + Group.new('TSComment', colors.important, colors.none, styles.bold + styles.italic)
37 - Group.new("TSNote", colors.accent_strong, colors.none, styles.bold)
37 + Group.new('TSNote', colors.accent_strong, colors.none, styles.bold)
39 - Group.new("TSFunction", colors.normal, colors.none, styles.NONE)
40 - Group.new("TSConstant", colors.normal, colors.none, styles.NONE)
41 - Group.new("TSConstMacro", colors.normal, colors.none, styles.NONE)
42 - Group.new("TSFuncBuiltin", colors.normal, colors.none, styles.NONE)
43 - Group.new("TSStructure", colors.normal, colors.none, styles.NONE)
44 - Group.new("TSTagDelimiter", colors.normal, colors.none, styles.NONE)
45 - Group.new("TSError", colors.error, colors.none, styles.NONE)
46 - Group.new("TSField", colors.normal, colors.none, styles.NONE)
47 - Group.new("TSParameter", colors.normal, colors.none, styles.NONE)
48 - Group.new("TSProperty", colors.normal, colors.none, styles.NONE)
39 + Group.new('TSFunction', colors.normal, colors.none, styles.NONE)
40 + Group.new('TSConstant', colors.normal, colors.none, styles.NONE)
41 + Group.new('TSConstMacro', colors.normal, colors.none, styles.NONE)
42 + Group.new('TSFuncBuiltin', colors.normal, colors.none, styles.NONE)
43 + Group.new('TSStructure', colors.normal, colors.none, styles.NONE)
44 + Group.new('TSTagDelimiter', colors.normal, colors.none, styles.NONE)
45 + Group.new('TSError', colors.error, colors.none, styles.NONE)
46 + Group.new('TSField', colors.normal, colors.none, styles.NONE)
47 + Group.new('TSParameter', colors.normal, colors.none, styles.NONE)
48 + Group.new('TSProperty', colors.normal, colors.none, styles.NONE)
50 - Group.new("TSNone", colors.none, colors.none, styles.NONE)
51 - Group.new("TSParameterReference", colors.normal, colors.none, styles.NONE)
52 - Group.new("TSConstructor", colors.normal, colors.none, styles.NONE)
53 - Group.new("TSAnnotation", colors.normal, colors.none, styles.NONE)
54 - Group.new("TSAttribute", colors.normal, colors.none, styles.NONE)
55 - Group.new("TSNamespace", colors.normal, colors.none, styles.NONE)
56 - Group.new("TSSymbol", colors.normal, colors.none, styles.NONE)
57 - Group.new("TSText", colors.normal, colors.none, styles.NONE)
58 - Group.new("TSStrong", colors.normal, colors.none, styles.NONE)
59 - Group.new("TSEmphasis", colors.normal, colors.none, styles.NONE)
60 - Group.new("TSUnderline", colors.normal, colors.none, styles.underline)
61 - Group.new("TSStrike", colors.normal, colors.none, styles.NONE)
62 - Group.new("TSMath", colors.normal, colors.none, styles.NONE)
63 - Group.new("TSTextReference", colors.normal, colors.none, styles.NONE)
64 - Group.new("TSEnvironment", colors.normal, colors.none, styles.NONE)
65 - Group.new("TSEnvironmentName", colors.normal, colors.none, styles.NONE)
66 - Group.new("TSTitle", colors.normal, colors.none, styles.NONE)
67 - Group.new("TSLiteral", colors.normal, colors.none, styles.NONE)
68 - Group.new("TSURI", colors.normal, colors.none, styles.NONE)
69 - Group.new("TSWarning", colors.warning, colors.none, styles.NONE)
70 - Group.new("TSDanger", colors.debug, colors.none, styles.NONE)
71 - Group.new("TSTag", colors.normal, colors.none, styles.NONE)
72 - Group.new("TSTagAttribute", colors.normal, colors.none, styles.NONE)
73 - Group.new("TSPlaygroundFocus", colors.important, colors.none, styles.NONE)
74 - Group.new("TSQueryLinterError", colors.error, colors.none, styles.NONE)
75 - Group.new("TSPlaygroundLang", colors.normal, colors.none, styles.NONE)
50 + Group.new('TSNone', colors.none, colors.none, styles.NONE)
51 + Group.new('TSParameterReference', colors.normal, colors.none, styles.NONE)
52 + Group.new('TSConstructor', colors.normal, colors.none, styles.NONE)
53 + Group.new('TSAnnotation', colors.normal, colors.none, styles.NONE)
54 + Group.new('TSAttribute', colors.normal, colors.none, styles.NONE)
55 + Group.new('TSNamespace', colors.normal, colors.none, styles.NONE)
56 + Group.new('TSSymbol', colors.normal, colors.none, styles.NONE)
57 + Group.new('TSText', colors.normal, colors.none, styles.NONE)
58 + Group.new('TSStrong', colors.normal, colors.none, styles.NONE)
59 + Group.new('TSEmphasis', colors.normal, colors.none, styles.NONE)
60 + Group.new('TSUnderline', colors.normal, colors.none, styles.underline)
61 + Group.new('TSStrike', colors.normal, colors.none, styles.NONE)
62 + Group.new('TSMath', colors.normal, colors.none, styles.NONE)
63 + Group.new('TSTextReference', colors.normal, colors.none, styles.NONE)
64 + Group.new('TSEnvironment', colors.normal, colors.none, styles.NONE)
65 + Group.new('TSEnvironmentName', colors.normal, colors.none, styles.NONE)
66 + Group.new('TSTitle', colors.normal, colors.none, styles.NONE)
67 + Group.new('TSLiteral', colors.normal, colors.none, styles.NONE)
68 + Group.new('TSURI', colors.normal, colors.none, styles.NONE)
69 + Group.new('TSWarning', colors.warning, colors.none, styles.NONE)
70 + Group.new('TSDanger', colors.debug, colors.none, styles.NONE)
71 + Group.new('TSTag', colors.normal, colors.none, styles.NONE)
72 + Group.new('TSTagAttribute', colors.normal, colors.none, styles.NONE)
73 + Group.new('TSPlaygroundFocus', colors.important, colors.none, styles.NONE)
74 + Group.new('TSQueryLinterError', colors.error, colors.none, styles.NONE)
75 + Group.new('TSPlaygroundLang', colors.normal, colors.none, styles.NONE)

neovim/stylua.toml

Added
new file mode 100644
1 +column_width = 120
2 +line_endings = "Unix"
3 +indent_type = "Tabs"
4 +indent_width = 2
5 +quote_style = "AutoPreferSingle"
6 +no_call_parentheses = true

neovim/vim.toml

Modified
1 1 [selene]
2 -base = "lua51"
2 +base = "lua52"
3 3 name = "vim"
5 5 [vim]

st.log

Added
new file mode 100644
3 +times in msec
4 + clock self+sourced self: sourced script
5 + clock elapsed: other lines
7 +000.051 000.051: --- NVIM STARTING ---
8 +023.167 023.116: locale set
9 +024.417 001.250: inits 1
10 +024.732 000.315: window checked
11 +029.376 004.644: parsing arguments
12 +029.511 000.135: expanding arguments
13 +029.599 000.087: inits 2
14 +033.203 003.604: init highlight
15 +033.210 000.007: waiting for UI
16 +037.255 004.044: done waiting for UI
17 +037.310 000.056: init screen for UI
18 +037.361 000.051: init default mappings
19 +039.210 001.849: init default autocommands
20 +077.526 037.326 037.326: sourcing C:\Users\okr\AppData\Local\nvim\init.lua
21 +077.621 001.086: sourcing vimrc file(s)
22 +099.152 000.158 000.158: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\nvim-treesitter\ftdetect\elixir.vim
23 +099.510 000.116 000.116: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\nvim-treesitter\ftdetect\fennel.vim
24 +099.868 000.125 000.125: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\nvim-treesitter\ftdetect\fish.vim
25 +100.227 000.125 000.125: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\nvim-treesitter\ftdetect\gdresource.vim
26 +100.602 000.121 000.121: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\nvim-treesitter\ftdetect\gdscript.vim
27 +100.946 000.114 000.114: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\nvim-treesitter\ftdetect\gomod.vim
28 +101.301 000.125 000.125: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\nvim-treesitter\ftdetect\graphql.vim
29 +101.667 000.132 000.132: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\nvim-treesitter\ftdetect\hcl.vim
30 +102.034 000.135 000.135: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\nvim-treesitter\ftdetect\heex.vim
31 +102.382 000.119 000.119: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\nvim-treesitter\ftdetect\hjson.vim
32 +102.752 000.134 000.134: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\nvim-treesitter\ftdetect\json5.vim
33 +103.101 000.119 000.119: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\nvim-treesitter\ftdetect\julia.vim
34 +103.463 000.132 000.132: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\nvim-treesitter\ftdetect\ledger.vim
35 +103.816 000.121 000.121: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\nvim-treesitter\ftdetect\nix.vim
36 +104.185 000.141 000.141: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\nvim-treesitter\ftdetect\ql.vim
37 +104.559 000.144 000.144: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\nvim-treesitter\ftdetect\query.vim
38 +104.979 000.189 000.189: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\nvim-treesitter\ftdetect\surface.vim
39 +105.488 000.143 000.143: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\nvim-treesitter\ftdetect\teal.vim
40 +105.873 000.139 000.139: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\nvim-treesitter\ftdetect\tlaplus.vim
41 +106.256 000.138 000.138: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\nvim-treesitter\ftdetect\yang.vim
42 +106.641 000.138 000.138: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\nvim-treesitter\ftdetect\zig.vim
43 +107.908 000.273 000.273: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\tree-sitter-just\ftdetect\just.vim
44 +108.618 000.150 000.150: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\vim-just\ftdetect\just.vim
45 +111.701 032.311 029.078: sourcing C:\Users\okr\scoop\apps\neovim-nightly\current\share\nvim\runtime\filetype.vim
46 +113.929 000.194 000.194: sourcing C:\Users\okr\scoop\apps\neovim-nightly\current\share\nvim\runtime\ftplugin.vim
47 +116.287 000.187 000.187: sourcing C:\Users\okr\scoop\apps\neovim-nightly\current\share\nvim\runtime\indent.vim
48 +119.395 000.273 000.273: sourcing C:\Users\okr\scoop\apps\neovim-nightly\current\share\nvim\runtime\syntax\synload.vim
49 +128.480 011.483 011.210: sourcing C:\Users\okr\scoop\apps\neovim-nightly\current\share\nvim\runtime\syntax\syntax.vim
50 +147.873 000.137 000.137: sourcing C:\Users\okr\scoop\apps\neovim-nightly\current\share\nvim\runtime\plugin\gzip.vim
51 +148.341 000.148 000.148: sourcing C:\Users\okr\scoop\apps\neovim-nightly\current\share\nvim\runtime\plugin\health.vim
52 +148.956 000.295 000.295: sourcing C:\Users\okr\scoop\apps\neovim-nightly\current\share\nvim\runtime\plugin\man.vim
53 +149.421 000.147 000.147: sourcing C:\Users\okr\scoop\apps\neovim-nightly\current\share\nvim\runtime\plugin\matchit.vim
54 +150.176 000.435 000.435: sourcing C:\Users\okr\scoop\apps\neovim-nightly\current\share\nvim\runtime\plugin\matchparen.vim
55 +150.679 000.167 000.167: sourcing C:\Users\okr\scoop\apps\neovim-nightly\current\share\nvim\runtime\plugin\netrwPlugin.vim
56 +151.997 000.129 000.129: sourcing C:\Users\okr\AppData\Local\nvim-data/rplugin.vim
57 +152.033 001.041 000.912: sourcing C:\Users\okr\scoop\apps\neovim-nightly\current\share\nvim\runtime\plugin\rplugin.vim
58 +152.706 000.356 000.356: sourcing C:\Users\okr\scoop\apps\neovim-nightly\current\share\nvim\runtime\plugin\shada.vim
59 +153.186 000.142 000.142: sourcing C:\Users\okr\scoop\apps\neovim-nightly\current\share\nvim\runtime\plugin\spellfile.vim
60 +153.662 000.146 000.146: sourcing C:\Users\okr\scoop\apps\neovim-nightly\current\share\nvim\runtime\plugin\tarPlugin.vim
61 +154.133 000.143 000.143: sourcing C:\Users\okr\scoop\apps\neovim-nightly\current\share\nvim\runtime\plugin\tohtml.vim
62 +154.643 000.175 000.175: sourcing C:\Users\okr\scoop\apps\neovim-nightly\current\share\nvim\runtime\plugin\tutor.vim
63 +155.217 000.219 000.219: sourcing C:\Users\okr\scoop\apps\neovim-nightly\current\share\nvim\runtime\plugin\zipPlugin.vim
64 +507.165 000.195 000.195: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\opt\zig.vim\ftdetect\zig.vim
65 +507.203 350.651 350.456: sourcing C:\Users\okr\AppData\Local\nvim\plugin\packer_compiled.lua
66 +512.817 036.818: loading rtp plugins
67 +522.795 000.691 000.691: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\hop.nvim\plugin\hop.vim
68 +530.614 006.588 006.588: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\kommentary\plugin\kommentary.vim
69 +534.000 002.080 002.080: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\lsp-colors.nvim\plugin\lsp-colors.vim
70 +563.767 027.000 027.000: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\nvim-cmp\plugin\cmp.lua
71 +564.935 000.238 000.238: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\nvim-colorizer.lua\plugin\colorizer.vim
72 +566.774 000.320 000.320: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\nvim-lspconfig\plugin\lspconfig.vim
73 +568.154 000.196 000.196: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\nvim-lsputils\plugin\nvim-lsputils.vim
74 +574.794 005.446 005.446: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\nvim-treesitter\plugin\nvim-treesitter.vim
75 +578.596 002.496 002.496: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\nvim-treesitter-refactor\plugin\nvim-treesitter-refactor.vim
76 +582.234 002.357 002.357: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\playground\plugin\nvim-treesitter-playground.vim
77 +583.692 000.234 000.234: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\plenary.nvim\plugin\plenary.vim
78 +585.041 000.176 000.176: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\popfix\plugin\popfix.vim
79 +586.706 000.178 000.178: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\rust-tools.nvim\plugin\rust-tools.vim
80 +612.351 024.143 024.143: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\symbols-outline.nvim\plugin\symbols-outline.vim
81 +614.059 000.461 000.461: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\telescope.nvim\plugin\telescope.vim
82 +616.093 000.176 000.176: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\which-key.nvim\plugin\which-key.vim
83 +617.288 031.690: loading packages
84 +651.787 031.538 031.538: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\cmp-buffer\after\plugin\cmp_buffer.lua
85 +653.295 000.715 000.715: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\cmp-calc\after\plugin\cmp_calc.lua
86 +654.818 000.774 000.774: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\cmp-emoji\after\plugin\cmp_emoji.lua
87 +656.205 000.446 000.446: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\cmp-nvim-lsp\after\plugin\cmp_nvim_lsp.lua
88 +658.096 001.037 001.037: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\cmp-nvim-lua\after\plugin\cmp_nvim_lua.lua
89 +660.064 001.173 001.173: sourcing C:\Users\okr\AppData\Local\nvim-data\site\pack\plugins\start\cmp-path\after\plugin\cmp_path.lua
90 +660.363 007.392: loading after plugins
91 +660.420 000.057: inits 3
92 +667.274 006.854: reading ShaDa
93 +667.315 000.041: opening buffers
94 +816.685 149.370: BufEnter autocommands
95 +816.701 000.016: editing files in windows
96 +859.472 042.771: VimEnter autocommands
97 +859.490 000.018: UIEnter autocommands
98 +859.495 000.005: before starting main loop
99 +860.724 001.229: first screen update
100 +860.736 000.013: --- NVIM STARTED ---

topgrade/topgrade.linux.toml

Modified
37 37 "TLDR" = "tldr --update"
39 39 # Update NeoVim-Plugins
40 -"NeoVim Plugins" = "echo 'Updating Plugins (packer) in headless neovim instance.' ; nvim --headless '+PluginsSync' '+autocmd User PackerComplete :qa'"
40 +"NeoVim Plugins" = "echo 'Updating Plugins (packer) in headless neovim instance.' ; nvim --headless -c 'autocmd User PackerCompile quitall' -c 'PluginsSync'"
42 42 # Dateisystem-Indexer ix erfrischen
43 43 "Indexa Update" = "ix --update"

topgrade/topgrade.windows.toml

Modified
42 42 "NeoVim Nightly" = "scoop update --force neovim-nightly"
44 44 # Update NeoVim-Plugins
45 -"NeoVim Plugins" = "Write-Host 'Updating Plugins (packer) in headless neovim instance.' ; nvim --headless '+PluginsSync' '+autocmd User PackerComplete :qa'"
45 +"NeoVim Plugins" = "Write-Host 'Updating Plugins (packer) in headless neovim instance.' ; nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PluginsSync'"
47 47 # Dateisystem-Indexer ix erfrischen
48 48 "Indexa Update" = "ix --update"