Merge branch 'trunk' of github.com:bugabinga/dotfiles into trunk
4fad50925d5625376bf18361a4df229927a0ed0a
Oliver Krylow <o.krylow@isp-insoft.de> ·
unsigned
- Parent 1: 0da4a2334e2e · Showing diff
- Parent 2: fc1e16222c20 · Diff against parent 2
bugabingas dorkfiles
4fad50925d5625376bf18361a4df229927a0ed0a
Oliver Krylow <o.krylow@isp-insoft.de> ·
unsigned
+2079 / −1208 text lines · all files grouped into 32 bars
+10 / −1 text lines
+0 / −9 text lines
new file mode 100644+287 / −0 text lines
# Nushell Config Fileuse table.nu *use os.nu *use prompt.nu *use aliases.nu *use todo.nuuse openssl.nu *use pacnew.nuuse syncthing.nu# for more information on themes see# https://github.com/nushell/nushell/blob/main/docs/How_To_Coloring_and_Theming.mdlet default_theme = { # color for nushell primitives separator: white leading_trailing_space_bg: { attr: n } # no fg, no bg, attr non effectively turns this off header: green_bold empty: blue bool: white int: white filesize: white duration: white date: white range: white float: white string: white nothing: white binary: white cellpath: white row_index: green_bold record: white list: white block: white hints: dark_gray # shapes are used to change the cli syntax highlighting shape_garbage: { fg: "#FFFFFF" bg: "#FF0000" attr: b} shape_binary: purple_bold shape_bool: light_cyan shape_int: purple_bold shape_float: purple_bold shape_range: yellow_bold shape_internalcall: cyan_bold shape_external: cyan shape_externalarg: green_bold shape_literal: blue shape_operator: yellow shape_signature: green_bold shape_string: green shape_string_interpolation: cyan_bold shape_datetime: cyan_bold shape_list: cyan_bold shape_table: blue_bold shape_record: cyan_bold shape_block: blue_bold shape_filepath: cyan shape_globpattern: cyan_bold shape_variable: purple shape_flag: blue_bold shape_custom: green shape_nothing: light_cyan}# The default config record. This is where much of your global configuration is setup.$env.config = { show_banner: false table: { mode: light # basic, compact, compact_double, light, thin, with_love, rounded, reinforced, heavy, none, other } ls: { use_ls_colors: true clickable_links: true } rm: { always_trash: true } color_config: $default_theme use_grid_icons: true footer_mode: "auto" # always, never, number_of_rows, auto completions: { quick: true # set this to false to prevent auto-selecting completions when only one remains partial: true # set this to false to prevent partial filling of the prompt } float_precision: 2 use_ansi_coloring: true filesize: { metric: false format: "auto" # b, kb, kib, mb, mib, gb, gib, tb, tib, pb, pib, eb, eib, zb, zib, auto } edit_mode: emacs # emacs, vi history: { file_format: "plaintext" max_size: 10000 sync_on_enter: true # Enable to share the history between multiple sessions, else you have to close the session to persist history to file } menus: [ # Configuration for default nushell menus # Note the lack of source parameter { name: completion_menu only_buffer_difference: false marker: "| " type: { layout: columnar columns: 4 # col_width: 20 # Optional value. If missing all the screen width is used to calculate column width col_padding: 2 } style: { text: green selected_text: green_reverse description_text: yellow } } { name: history_menu only_buffer_difference: true marker: "? " type: { layout: list page_size: 10 } style: { text: green selected_text: green_reverse description_text: yellow } } { name: help_menu only_buffer_difference: true marker: "? " type: { layout: description columns: 4 col_width: 20 # Optional value. If missing all the screen width is used to calculate column width col_padding: 2 selection_rows: 4 description_rows: 10 } style: { text: green selected_text: green_reverse description_text: yellow } } # Example of extra menus created using a nushell source # Use the source field to create a list of records that populates # the menu { name: commands_menu only_buffer_difference: false marker: "# " type: { layout: columnar columns: 4 col_width: 20 col_padding: 2 } style: { text: green selected_text: green_reverse description_text: yellow } source: { |buffer, position| $nu.scope.commands | where command =~ $buffer | each { |it| {value: $it.command description: $it.usage} } } } { name: vars_menu only_buffer_difference: true marker: "# " type: { layout: list page_size: 10 } style: { text: green selected_text: green_reverse description_text: yellow } source: { |buffer, position| $nu.scope.vars | where name =~ $buffer | sort-by name | each { |it| {value: $it.name description: $it.type} } } } { name: commands_with_description only_buffer_difference: true marker: "# " type: { layout: description columns: 4 col_width: 20 col_padding: 2 selection_rows: 4 description_rows: 10 } style: { text: green selected_text: green_reverse description_text: yellow } source: { |buffer, position| $nu.scope.commands | where command =~ $buffer | each { |it| {value: $it.command description: $it.usage} } } } ] keybindings: [ { name: completion_menu modifier: none keycode: tab mode: emacs # Options: emacs vi_normal vi_insert event: { until: [ { send: menu name: completion_menu } { send: menunext } ] } } { name: completion_previous modifier: shift keycode: backtab mode: [emacs, vi_normal, vi_insert] # Note: You can add the same keybinding to all modes by using a list event: { send: menuprevious } } { name: history_menu modifier: control keycode: char_x mode: emacs event: { until: [ { send: menu name: history_menu } { send: menupagenext } ] } } { name: history_previous modifier: control keycode: char_z mode: emacs event: { until: [ { send: menupageprevious } { edit: undo } ] } } # Keybindings used to trigger the user defined menus { name: commands_menu modifier: control keycode: char_t mode: [emacs, vi_normal, vi_insert] event: { send: menu name: commands_menu } } { name: vars_menu modifier: control keycode: char_y mode: [emacs, vi_normal, vi_insert] event: { send: menu name: vars_menu } } { name: commands_with_description modifier: control keycode: char_u mode: [emacs, vi_normal, vi_insert] event: { send: menu name: commands_with_description } } ]}# must be done, after defining config, since zoxide mutates ituse zoxide.nu *overlay use coreutils.nunew file mode 100644+45 / −0 text lines
# GLOBAL VARIABLES# GLOBAL VARIABLES$env.WIN32 = ( $nu.os-info.name =~ "windows" )$env.NURC_DIR = ( $nu.config-path | path expand | path dirname )$env.DOTFILES = ( $env.NURC_DIR | path join ".." | path expand )$env.WORKSPACE = if $env.WIN32 { "W:/" } else { "~/Workspace" | path expand }$env.NOTES = if $env.WIN32 { "N:/" } else { "~/Notes" | path expand }if ($env | get -i TERM_PROGRAM) == WezTerm { $env.TERM = "wezterm" $env.TERMCAP = ~/.terminfo/w/wezterm}# theme for ls and other programs, that use LS_COLORS$env.LS_COLORS = (try { vivid generate ayu | into string } catch {""})# Specifies how environment variables are:# - converted from a string to a value on Nushell startup (from_string)# - converted from a value back to a string when running external commands (to_string)# Note: The conversions happen *after* config.nu is loaded$env.ENV_CONVERSIONS = { "PATH": { from_string: { |s| $s | split row (char esep) } to_string: { |v| $v | str join (char esep) } } "Path": { from_string: { |s| $s | split row (char esep) } to_string: { |v| $v | str join (char esep) } }}# Directories to search for scripts when calling source or use$env.NU_LIB_DIRS = [ ($nu.config-path | path dirname | path join 'modules'), ($nu.config-path | path dirname | path join 'completions')]alias cb = flatpak run app.getclipboard.Clipboard$env.CLIPBOARD_EDITOR = nvim$env.CLIPBOARD_HISTORY = 100000$env.CLIPBOARD_PERSISTDIR = /home/oli/Clipboard$env.CLIPBOARD_NOAUDIO = 1# $env.CLIPBOARD_NOGUI = 1$env.CLIPBOARD_THEME = lightnew file mode 100644+2 / −0 text lines
+15 / −15 text lines
+35 / −12 text lines
because life is just too long...<table>yoyo</table>init.lua: main entry point\lua/std: standard lib. can only depend on itself and neovim apis.\lua/bugabinga: config modules. in aggregation, defines all of the config. can depend on itself, std and plugins.\lua/bugabinga/plugins: third party plugins and their config glue integrating it into the config.\colors/nugu: color theme\ftplugin: file type specific config_why_ do I do *this* to ~myself~ ...?* pandoc with lua filters for diagrams for generating documents and previewing --> https://github.com/tex/vimpreviewpandoc* think about mini.colors* setup spell checking for code (english + german)* use gen.ai to generate docs* learn marks and refac mark.lua* use ltex-ls for markdown, code comments and commit messages* setup DAP* add nu-check to nvim-lint* autocomplete in cmdline does not work no more* make telescope highlights more like NormalFloat* create facade over vim.api.nvim_create_user_command* fix autocomplete in cmdline+9 / −13 text lines
require'bugabinga.diagnostic'require'bugabinga.trim'require'bugabinga.mark'require'bugabinga.lsp'-- TODO:-- [ ] highlight return keyword-- [ ] use ltex-ls for markdown, code comments and commit messages-- [ ] DAP-- [ ] add nu-check to nvim-lint-- [ ] replace hydra with normal mapping + whcihkey+4 / −0 text lines
+35 / −28 text lines
"Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" }, "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, "better-escape.nvim": { "branch": "master", "commit": "7031dc734add47bb71c010e0551829fa5799375f" }, "cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" }, "cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" }, "cmp-omni": { "branch": "main", "commit": "4ef610bbd85a5ee4e97e09450c0daecbdc60de86" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, "diffview.nvim": { "branch": "main", "commit": "a111d19ccceac6530448d329c63f998f77b5626e" }, "dressing.nvim": { "branch": "master", "commit": "59fe7ef1aeeed499b983614fcfff89206bf0d5ce" }, "flash.nvim": { "branch": "main", "commit": "e5a7bd96d0bb7e0806bfc18adea5ab148165bd62" }, "friendly-snippets": { "branch": "main", "commit": "ebf6d6e83494cdd88a54a429340256f4dbb6a052" }, "gitsigns.nvim": { "branch": "main", "commit": "bb808fc7376ed7bac0fbe8f47b83d4bf01738167" }, "glow.nvim": { "branch": "main", "commit": "cf2177a514859fa3c55837b46de91d93b24cf488" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "diffview.nvim": { "branch": "main", "commit": "d38c1b5266850f77f75e006bcc26213684e1e141" }, "dressing.nvim": { "branch": "master", "commit": "1f2d1206a03bd3add8aedf6251e4534611de577f" }, "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, "friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" }, "gen.nvim": { "branch": "main", "commit": "de6952db44082b8931a237d6af7fa729a06f6b25" }, "gitsigns.nvim": { "branch": "main", "commit": "5a9a6ac29a7805c4783cda21b80a1e361964b3f2" }, "glow.nvim": { "branch": "main", "commit": "5b38fb7b6e806cac62707a4aba8c10c5f14d5bb5" }, "mason.nvim": { "branch": "main", "commit": "d66c60e17dd6fd8165194b1d14d21f7eb2c1697a" }, "multicursors.nvim": { "branch": "main", "commit": "b7a837496da6f5b39b610a7cbd6c3f7d05526d6e" }, "neodev.nvim": { "branch": "main", "commit": "da1562e1e3df0e994ddc52cb4ba22376a5d7f2fc" }, "neogen": { "branch": "main", "commit": "cb1f384df804c1bf729332c4f728253fe17962d4" }, "noice.nvim": { "branch": "main", "commit": "396f9146529130904e07c45e90ecdbfa607534f3" }, "mason.nvim": { "branch": "main", "commit": "cd7835b15f5a4204fc37e0aa739347472121a54c" }, "mini.align": { "branch": "main", "commit": "e3a0c114d3fea0479f8e8ee3e273c7ca4ba6ea8d" }, "mini.bracketed": { "branch": "main", "commit": "d99f8f6c93e2a4cff1ebc27072d74ba400c8d241" }, "mini.colors": { "branch": "main", "commit": "a84b460fd5012a6af878d6beb96e912181f25c30" }, "mini.starter": { "branch": "main", "commit": "c74bdde61385360b02ca9fd7731ebce8903d78d7" }, "mkdir.nvim": { "branch": "main", "commit": "c55d1dee4f099528a1853b28bb28caa802eba217" }, "neodev.nvim": { "branch": "main", "commit": "d617d9eb27e73e701e446874c6ea2cb528719260" }, "neogen": { "branch": "main", "commit": "70127baaff25611deaf1a29d801fc054ad9d2dc1" }, "noice.nvim": { "branch": "main", "commit": "50fc77bcd75cf32374521fb227e9f41f3fe1521a" }, "nrpattern.nvim": { "branch": "master", "commit": "f862ce687761078ef3155688151c55f69d28453e" }, "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, "nvim-genghis": { "branch": "main", "commit": "b15d7d0c37f7739a5723f20dfae9e501b9952b08" }, "nvim-genghis": { "branch": "main", "commit": "ba59d6fd8440c9b8928acd22b845d18fe9a8b848" }, "nvim-treesitter-endwise": { "branch": "master", "commit": "4c344ffc8d54d7e1ba2cefaaa2c10ea93aa1cc2d" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "bd103502252027434ec42f628d2dbf54821d4ce6" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "95e9ba9de4289d221666b66fd930d157c7ca08c6" }, "nvim-web-devicons": { "branch": "master", "commit": "45d0237c427baba8cd05e0ab26d30e2ee58c2c82" }, "oil.nvim": { "branch": "master", "commit": "fdb50dc5c57524c4b0b05b593abff4d4f7a099f6" }, "persistence.nvim": { "branch": "main", "commit": "adcf6913693a0434665d162ee45a186230496f8a" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "92e688f013c69f90c9bbd596019ec10235bc51de" }, "nvim-web-devicons": { "branch": "master", "commit": "5de460ca7595806044eced31e3c36c159a493857" }, "oil.nvim": { "branch": "stevearc-trash", "commit": "9487fdfeb5b50ebcd46e644fbdc9d15ac9b9f55d" }, "persistence.nvim": { "branch": "main", "commit": "ad538bfd5336f1335cdb6fd4e0b0eebfa6e12f32" }, "substitute.nvim": { "branch": "main", "commit": "42d09f1e6324d98aa2e5b765b64528e0aefe72b0" }, "telescope-symbols.nvim": { "branch": "master", "commit": "f2060117d965df4a626f068a4ebbd8ee051aa076" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "b0015e6e4b46a64192c64b68dec9a9ac5a4e5690" }, "telescope-zoxide": { "branch": "main", "commit": "68966349aa1b8e9ade403e18479ecf79447389a7" }, "todo-comments.nvim": { "branch": "main", "commit": "8febc60a76feefd8203077ef78b6a262ea1a41f9" },+10 / −26 text lines
local want = require 'std.want'+30 / −19 text lines
custom_keys = false, { 'Show', '' , lazy.show } , { 'Install', 'i', lazy.install }, { 'Update', 'u', lazy.update }, { 'Sync', 's', lazy.sync }, { 'Clean', 'x', lazy.clean }, { 'Check', 'c', lazy.check }, { 'Log', 'l', lazy.log }, { 'Restore', 'r', lazy.restore }, { 'Profile', 'p', lazy.profile }, { 'Debug', 'd', lazy.debug }, { 'Show', '' , lazy.show } , { 'Install', 'i', lazy.install }, { 'Update', 'u', lazy.update }, { 'Sync', 's', lazy.sync }, { 'Clean', 'x', lazy.clean }, { 'Check', 'c', lazy.check }, { 'Log', 'l', lazy.log }, { 'Restore', 'r', lazy.restore }, { 'Profile', 'p', lazy.profile }, { 'Debug', 'd', lazy.debug },+186 / −43 text lines
local create_shared_config_path = function(base_path, syntax_server)local create_shared_config_path = function ( base_path, syntax_server ) os_config = syntax_server and 'config_win' or 'config_ss_win' os_config = syntax_server and 'config_ss_win' or 'config_win' cache = type(cache) == 'table' and cache[1] or cache cache = type( cache ) == 'table' and cache[1] or cache return vim.fs.joinpath(cache, 'jdtls_data', data_name) return vim.fs.joinpath( cache, 'jdtls_data', data_name )local create_jdtls_command = function(syntax_server) local mason_packages_base_path = require 'mason-core.package':get_install_path() local jdtls_package_path = vim.fs.joinpath(mason_packages_base_path, 'jdtls') local shared_config_path = create_shared_config_path(jdtls_package_path, syntax_server) local launcher_jar = find_launcher_jar(jdtls_package_path)local function get_bundles() local mason_registry = require 'mason-registry' local java_debug = mason_registry.get_package 'java-debug-adapter' local java_test = mason_registry.get_package 'java-test' local java_debug_path = java_debug:get_install_path() local java_test_path = java_test:get_install_path() local bundles = {} --FIXME: refactor this! vim.list_extend( bundles, vim.split( vim.fn.glob( java_debug_path .. '/extension/server/com.microsoft.java.debug.plugin-*.jar' ), '\n' ) ) vim.list_extend( bundles, vim.split( vim.fn.glob( java_test_path .. '/extension/server/*.jar' ), '\n' ) ) return bundlesendlocal create_jdtls_command = function ( syntax_server ) local mason_registry = require 'mason-registry' local jdtls_package_path = mason_registry.get_package('jdtls'):get_install_path() local shared_config_path = create_shared_config_path( jdtls_package_path, syntax_server ) local launcher_jar = find_launcher_jar( jdtls_package_path ) local ss_option = syntax_server and '-Dsyntaxserver=true' or '' local ss_option = syntax_server and '-Dsyntaxserver=true' or nil codeGeneration = { toString = { template = '${object.className}{${member.name()}=${member.value()}, ${otherMembers}}', }, hashCodeEquals = { useJava7Objects = true }, useBlocks = true, }, eclipse = { downloadSources = true }, }, configuration = { updateBuildConfiguration = 'interactive', runtimes = find_jdks(), }, maven = { downloadSources = true }, implementationsCodeLens = { enabled = true }, referencesCodeLens = { enabled = true }, references = { includeDecompiledSources = true }, inlayHints = { parameterNames = { enabled = 'all' } }, format = { enabled = true, -- TODO: set these here with my preferred settings -- set these on a project level -> read intellij /eclipse settings? -- settings = { -- url = 'TODO', -- profile = 'TODO', -- }, configuration = { runtimes = find_jdks(), },local jdtls_lsp_start = function(config, opts)local jdtls_lsp_start = function ( config, opts ) require 'jdtls'.start_or_attach(config, opts) require 'jdtls'.start_or_attach( config, opts )endlocal get_extended_capabilites = function () local ext = require 'jdtls'.extendedClientCapabilities ext.resolveAdditionalTextEditsSupport = true return extendlocal on_attach = function () local jdtls = require 'jdtls' vim.lsp.codelens.refresh() jdtls.setup_dap { hotcodereplace = 'auto' } require 'jdtls.dap'.setup_dap_main_class_configs() require 'jdtls.setup'.add_commands() map.normal { description = 'Organize Imports', category = 'jdlts', keys = '<leader>ljo', command = jdtls.organize_imports, } map.normal { description = 'Extract Variable', category = 'jdlts', keys = '<leader>ljv', command = jdtls.extract_variable, } map.normal { description = 'Extract Constant', category = 'jdlts', keys = '<leader>ljc', command = jdtls.extract_constant, } map.normal { description = 'Test Nearest Method', category = 'jdlts', keys = '<leader>ljt', command = jdtls.test_nearest_method, } map.normal { description = 'Test Class', category = 'jdlts', keys = '<leader>ljT', command = jdtls.test_class, } map.normal { description = 'Update Config', category = 'jdlts', keys = '<leader>lju', command = '<cmd>JdtUpdateConfig<cr>', } map.visual { description = 'Extract Variable', category = 'jdlts', keys = '<leader>ljv', command = function() jdtls.extract_variable(true) end, } map.visual { description = 'Extract Constant', category = 'jdlts', keys = '<leader>ljc', command = function() jdtls.extract_constant(true) end, } map.visual { description = 'Extract Method', category = 'jdlts', keys = '<leader>ljm', command = function() jdtls.extract_method(true) end, } auto 'refresh_codelens' { events = 'BufWritePost', description = 'Refreshes LSP CodeLens after java file is written.', pattern = '*.java', command = function () pcall( vim.lsp.codelens.refresh ) end, }+5 / −5 text lines
+1 / −3 text lines
+2 / −2 text lines
local cargo_home = os.getenv 'CARGO_HOME' or util.path.join(vim.env.HOME, '.cargo') local cargo_home = os.getenv 'CARGO_HOME' or vim.fs.joinpath(vim.env.HOME, '.cargo')+82 / −53 text lines
local want = require 'std.want' -- vim.print( "SEARCHING LSP CLIENT FOR:", match, buffer_path) vim.notify( string.format( 'searching lsp client for: match: %s, buffer: %s, path: %s', match, bufnr, buffer_path ) ) local root_dir = type( config.root_dir ) == 'string' and config.root_dir or config.root_dir( buffer_path ) local cmp_capabilities = want 'cmp_nvim_lsp' ( function ( cmp ) return cmp.default_capabilities() end, {} ) local cmp_capabilities = require 'cmp_nvim_lsp'.default_capabilities() -- on_exit = function(code, signal, client_id) vim.print("LSP CLIENT EXIT", code, signal, client_id) end, on_exit = function ( code, signal, client_id ) vim.print( 'LSP CLIENT EXIT', code, signal, client_id ) end, -- on_attach = function(client, bufnr) vim.print("LSP CLIENT ATTACH", client.data.client_id, bufnr) end, -- local supported = vim.tbl_get(client, 'server_capabilities', 'workspace', 'workspaceFolders', 'supported') -- reuse_client = function ( existing_client, new_config ) -- --TODO lsps with single file or worksopaces support do not need smame root dir. instead add_workspace_folder -- local same_name_and_root = existing_client.name == new_config.name and -- existing_client.workspace_folders[1] == new_config.root_dir; -- -- vim.print( 'resuing lsp client?', same_name_and_root ) -- return same_name_and_root; -- end, reuse_client = function ( existing_client, new_config ) -- vim.print( -- 'lsp resuse client', -- existing_client.name, -- existing_client.workspace_folders, -- new_config.name, -- new_config.root_dir -- ) --TODO lsps with single file or worksopaces support do not need smame root dir. instead add_workspace_folder local same_name = existing_client.name == new_config.name local new_root_raw = new_config.root_dir or nil local existing_root_raw = existing_client.workspace_folders and #existing_client.workspace_folders >= 1 and existing_client.workspace_folders[1].name or nil if not (new_root_raw and existing_root_raw) then return false end local new_root = vim.fs.normalize( new_root_raw ) local existing_root = vim.fs.normalize( existing_root_raw ) local same_root = new_root == existing_root local reuse = same_name and same_root -- vim.print( 'reusing lsp client?', reuse ) return reuse end, add(map.normal { description = 'Format current buffer', category = 'lsp', buffer = bufnr, keys = '<c-s>', --TODO: save actions command = vim.lsp.buf.format, }) add(map.normal { add( map.normal { local client = vim.lsp.get_client_by_id( args.data.client_id )+4 / −4 text lines
vim.api.nvim_buf_set_keymap( bufnr, 'n', '<leader>m', '', { vim.api.nvim_buf_set_keymap( bufnr, 'n', '<leader>ma', '', { vim.api.nvim_buf_set_keymap( bufnr, 'n', '<leader>dm', '', { vim.api.nvim_buf_set_keymap( bufnr, 'n', '<leader>md', '', { vim.api.nvim_buf_set_keymap( bufnr, 'n', '<leader>dM', '', { vim.api.nvim_buf_set_keymap( bufnr, 'n', '<leader>mD', '', {+171 / −149 text lines
vim.g.terminal_color_0 = palette.ui_backdrop -- blackvim.g.terminal_color_1 = palette.content_accent -- maroonvim.g.terminal_color_2 = palette.info -- greenvim.g.terminal_color_3 = palette.ui_focus -- olivevim.g.terminal_color_4 = palette.content_important_local -- navyvim.g.terminal_color_5 = palette.content_important_global -- purplevim.g.terminal_color_6 = palette.ui_focus -- tealvim.g.terminal_color_7 = palette.content_normal -- silvervim.g.terminal_color_8 = palette.ui_minor -- greyvim.g.terminal_color_9 = palette.error -- redvim.g.terminal_color_10 = palette.info -- limevim.g.terminal_color_11 = palette.content_focus -- yellowvim.g.terminal_color_12 = palette.ui_important_local -- bluevim.g.terminal_color_13 = palette.ui_accent -- fuchsiavim.g.terminal_color_14 = palette.ui_important_global -- aquavim.g.terminal_color_15 = palette.ui_normal -- whitelocal content_unfocus = hsl( palette.content_unfocus )local content_unfocus = flux( hsl( palette.content_unfocus ), 33 ) -- FIXME: this change needs to go into nugu Debug { fg = debug.readable(), bg = debug, gui = 'bold' }, -- debugging statements Debug { fg = debug.readable(), bg = debug, gui = 'bold' }, Search { fg = content_important_global.readable(), bg = content_important_global }, IncSearch { fg = content_important_local.readable(), bg = content_important_local }, NormalFloat { fg = ui_normal, bg = ui_backdrop }, -- Normal text in floating windows. FloatBorder { fg = ui_accent, bg = NormalFloat.bg }, ColorColumn { fg = ui_important_global, bg = content_backdrop }, -- used for the columns set with 'colorcolumn' Conceal { fg = content_normal, bg = ui_unfocus, gui = 'italic' }, -- placeholder characters substituted for concealed text (see 'conceallevel') Cursor { bg = ui_accent }, -- character under the cursor lCursor { bg = ui_accent }, -- the character under the cursor when |language-mapping| is used (see 'guicursor') CursorIM { bg = ui_accent }, -- like Cursor, but used when in IME mode |CursorIM| Directory { fg = Normal.fg }, -- directory names (and other special names in listings) DiffAdd { fg = content_focus }, -- diff mode: Added line |diff.txt| DiffDelete { fg = content_focus, gui = 'strikethrough' }, -- diff mode: Deleted line |diff.txt| DiffChange { fg = content_important_global }, -- diff mode: Changed line |diff.txt| DiffText { fg = content_important_local.readable(), bg = content_important_local }, -- diff mode: Changed text within a changed line |diff.txt| EndOfBuffer { Normal }, -- filler lines (~) after the end of the buffer. By default, this is highlighted like |hl-NonText|. TermCursor { lCursor }, -- cursor in a focused terminal TermCursorNC { Cursor }, -- cursor in an unfocused terminal ErrorMsg { fg = error.readable(), bg = error }, -- error messages on the command line VertSplit { fg = ui_important_global, bg = content_backdrop }, -- the column separating vertically split windows Folded { Conceal }, -- line used for closed folds FoldColumn { Conceal }, -- 'foldcolumn' SignColumn { bg = ui_backdrop }, -- column where |signs| are displayed ModeMsg { gui = 'bold' }, -- 'showmode' message (e.g., "-- INSERT -- ") MsgArea { Normal }, -- Area for messages and cmdline MsgSeparator { fg = ui_accent }, -- Separator for scrolled messages, `msgsep` flag of 'display' MoreMsg { Normal }, -- |more-prompt| NonText { fg = ui_unfocus }, -- '@' at the end of the window, characters from 'showbreak' and other characters that do not really exist in the text (e.g., ">" displayed when a double-wide character doesn't fit at the end of the line). See also |hl-EndOfBuffer|. NormalNC {}, -- normal text in non-current windows Pmenu { NormalFloat }, -- Popup menu: normal item. PmenuSel { fg = ui_focus, sp = ui_focus.readable(), bg = ui_unfocus, gui = 'underline' }, -- Popup menu: selected item. PmenuSbar { bg = ui_unfocus }, -- Popup menu: scrollbar. PmenuThumb { bg = ui_minor }, -- Popup menu: Thumb of the scrollbar. Question { fg = ui_important_global, gui = 'bold' }, -- |hit-enter| prompt and yes/no questions QuickFixLine { PmenuSel }, -- Current |quickfix| item in the quickfix window. Combined with |hl-CursorLine| when the cursor is there. SpecialKey { fg = error, bg = content_unfocus, gui = 'bold' }, -- Unprintable characters: text displayed differently from what it really is. But not 'listchars' whitespace. |hl-Whitespace| SpellBad { fg = error, gui = 'undercurl' }, -- Word that is not recognized by the spellchecker. |spell| Combined with the highlighting used otherwise. SpellCap { SpellBad }, -- Word that should start with a capital. |spell| Combined with the highlighting used otherwise. SpellLocal { SpellBad }, -- Word that is recognized by the spellchecker as one that is used in another region. |spell| Combined with the highlighting used otherwise. SpellRare { SpellBad }, -- Word that is recognized by the spellchecker as one that is hardly ever used. |spell| Combined with the highlighting used otherwise. StatusLine { fg = ui_normal, bg = ui_backdrop }, -- status line of current window StatusLineNC { fg = ui_normal, bg = ui_unfocus }, -- status lines of not-current windows Note: if this is equal to "StatusLine" Vim will use "^^^" in the status line of the current window. Winbar { StatusLine }, WinbarNC { StatusLineNC }, IndentBlanklineContextChar { fg = content_accent, gui = 'nocombine' }, IndentBlanklineContextStart { sp = IndentBlanklineContextChar.fg, gui = 'underline' }, Title { fg = content_important_global, sp = content_important_global, gui = 'bold underline' }, -- titles for output from ":set all", ":autocmd" etc. TabLine { StatusLine }, -- tab pages line, not active tab page label TabLineFill { bg = TabLine.bg }, -- tab pages line, where there are no labels TabLineSel { fg = ui_accent.readable(), bg = ui_accent, gui = 'underline bold' }, -- tab pages line, active tab page label Visual { fg = content_focus.readable(), bg = content_focus }, -- Visual mode selection VisualNOS { fg = Visual.fg, bg = flux( Visual.bg, -42 ) }, -- Visual mode selection when vim is "Not Owning the Selection". WarningMsg { fg = warning, gui = 'bold' }, -- warning messages WhiteSpace { fg = ui_unfocus }, -- "nbsp", "space", "tab" and "trail" in 'listchars' WildMenu { fg = ui_accent, gui = 'bold' }, -- current match in 'wildmenu' completion Search { fg = content_important_global, bg = content_important_global.readable() }, IncSearch { fg = content_important_local, bg = content_important_local.readable() }, NormalFloat { fg = ui_normal, bg = ui_backdrop }, FloatBorder { fg = ui_accent, bg = Normal.bg }, ColorColumn { fg = ui_important_global, bg = Normal.bg }, Conceal { fg = content_focus, bg = Normal.bg }, Cursor { bg = ui_accent }, -- lCursor { Cursor }, -- CursorIM { Cursor }, Directory { fg = Normal.fg }, DiffAdd { fg = content_focus }, DiffDelete { fg = content_focus, gui = 'strikethrough' }, DiffChange { fg = content_important_global }, DiffText { fg = content_important_local.readable(), bg = content_important_local }, EndOfBuffer { Normal }, -- TermCursor { Cursor }, -- TermCursorNC { Cursor }, ErrorMsg { fg = error.readable(), bg = error }, VertSplit { fg = ui_important_global, bg = LineNr.bg }, Folded { Conceal }, FoldColumn { LineNr }, SignColumn { LineNr }, ModeMsg { gui = 'bold' }, MsgArea { Normal }, MsgSeparator { Debug }, MoreMsg { Normal }, NonText { fg = content_unfocus }, Whitespace { NonText }, NormalNC { Normal }, Pmenu { NormalFloat }, PmenuSel { fg = ui_important_local, sp = ui_important_local, bg = Pemnu.bg, gui = 'bold underline' }, PmenuSbar { bg = ui_unfocus }, PmenuThumb { bg = ui_minor }, Question { fg = ui_important_local, gui = 'bold' }, QuickFixLine { PmenuSel }, SpecialKey { fg = error, bg = content_unfocus, gui = 'bold' }, SpellBad { fg = error, gui = 'undercurl' }, SpellCap { SpellBad }, SpellLocal { SpellBad }, SpellRare { SpellBad }, StatusLine { fg = ui_focus, bg = ui_unfocus }, StatusLineNC { fg = ui_normal, bg = ui_unfocus }, Winbar { fg = ui_focus, bg = StatusLine.bg }, WinbarNC { fg = ui_minor, bg = LineNr.bg }, Title { fg = content_important_global, sp = content_important_global, gui = 'bold underline' }, TabLine { StatusLine }, TabLineFill { fg = TabLine.fg, bg = content_backdrop }, TabLineSel { fg = ui_important_global, bg = ui_unfocus }, Visual { fg = content_focus.readable(), bg = content_focus }, VisualNOS { fg = Visual.fg, bg = flux( Visual.bg, -42 ) }, WarningMsg { fg = warning, gui = 'bold' }, WildMenu { Debug }, Statement { fg = content_minor }, -- (preferred) any statement Conditional { Statement }, -- if, then, else, endif, switch, etc. Repeat { Statement }, -- for, do, while, etc. Label { Statement }, -- case, default, etc. Operator { Statement }, -- "sizeof", "+", "*", etc. Keyword { Statement }, -- any other keyword Exception { Statement }, -- try, catch, throw PreProc { fg = content_important_global, bg = content_unfocus, gui = 'bold' }, -- (preferred) generic Preprocessor Include { PreProc }, -- preprocessor #include Define { PreProc }, -- preprocessor #define Macro { PreProc }, -- same as Define PreCondit { PreProc }, -- preprocessor #if, #else, #endif, etc. Special { fg = content_normal, gui = 'italic bold' }, -- (preferred) any special symbol SpecialChar { Special }, -- special character in a constant Tag { Special }, -- you can use CTRL-] on this Delimiter { fg = content_minor }, -- character that needs attention SpecialComment { Special }, -- special things inside a comment Underlined { sp = content_normal, gui = 'underline' }, -- (preferred) text that stands out, HTML links Underlined { sp = content_normal, gui = 'underline' }, -- ("Ignore", below, may be invisible...) Ignore { fg = Normal.bg, bg = Normal.bg }, -- (preferred) left blank, hidden |hl-Ignore| Error { fg = error }, -- (preferred) any erroneous construct Ignore { fg = Normal.bg, bg = Normal.bg }, Error { fg = error }, Todo { fg = content_important_global, sp = content_important_global, gui = 'bold underdouble' }, DiagnosticDeprecated { fg = ui_important_global, sp = ui_important_global, gui = 'strikethrough' }, LspReferenceText { fg = content_focus, bg = content_unfocus }, LspReferenceText { sp = content_unfocus, gui = 'underline' }, LspInlayHint { fg = content_minor, bg = ui_unfocus }, -- hlargs.nvim Hlargs { fg = ui_important_local }, LspInlayHint { fg = content_minor, bg = Normal.bg }, sym '@keyword.return' { fg = Keyword.fg, bg = Keyword.bg, gui = 'underline bold' }, -- lazy.nvim LazyButtonActive { fg = ui_important_local.readable(), sp = NormalFloat.fg, bg = ui_important_local, gui = LazyButton LazyProgressTodo { fg = LazyProgressDone.bg, bg = LazyProgressDone.fg, gui = LazyProgressDone.gui }, LazyReasonCmd { N.fgormalFloat }, LazyReasonEvent { N.fgormalFloat }, LazyReasonFt { N.fgormalFloat }, LazyReasonImport { N.fgormalFloat }, LazyReasonKeys { N.fgormalFloat }, LazyReasonPlugin { N.fgormalFloat }, LazyReasonRuntime { N.fgormalFloat }, LazyReasonSource { N.fgormalFloat }, LazyReasonStart { N.fgormalFloat }, LazyReasonCmd { NormalFloat }, LazyReasonEvent { NormalFloat }, LazyReasonFt { NormalFloat }, LazyReasonImport { NormalFloat }, LazyReasonKeys { NormalFloat }, LazyReasonPlugin { NormalFloat }, LazyReasonRuntime { NormalFloat }, LazyReasonSource { NormalFloat }, LazyReasonStart { NormalFloat }, NoiceCmdlineIconCmdline { fg = ui_accent, bg = NoiceCmdlineIcon.bg, gui = NoiceCmdlineIcon.gui }, NoiceCmdlineIconCmdline { NoiceCmdlineIcon }, NoiceConfirmBorder { fg = ui_accent, bg = NormalFloat.bg }, NoiceConfirmBorder { FloatBorder }, NoicePopupmenuBorder { fg = ui_accent, bg = NormalFloat.bg }, NoicePopupmenuBorder { FloatBorder }, NoiceSplit { NormalFloat }, NoiceSplitBorder { NoiceConfirmBorder, bg = NormalFloat.bg }, NoiceVirtualText { fg = ui_important_local, bg = ui_backdrop, gui = 'bold' }, NoiceSplit { Normal }, NoiceSplitBorder { FloatBorder }, NoiceVirtualText { fg = ui_important_global, bg = ui_unfocus }, NotifyERRORBorder { fg = DiagnosticError.fg, bg = FloatBorder.bg }, NotifyWARNBorder { fg = DiagnosticWarn.fg, bg = FloatBorder.bg }, NotifyINFOBorder { fg = DiagnosticInfo.fg, bg = FloatBorder.bg }, NotifyDEBUGBorder { fg = Debug.bg, bg = FloatBorder.bg }, NotifyTRACEBorder { fg = DiagnosticHint.fg, bg = FloatBorder.bg }, -- Notify NotifyERRORBorder { DiagnosticError, bg = NormalFloat.bg }, NotifyWARNBorder { DiagnosticWarn, bg = NormalFloat.bg }, NotifyINFOBorder { DiagnosticInfo, bg = NormalFloat.bg }, NotifyDEBUGBorder { fg = Debug.bg, bg = NormalFloat.bg }, NotifyTRACEBorder { DiagnosticHint, bg = NormalFloat.bg }, NotifyERRORIcon { NotifyERRORBorder }, NotifyWARNIcon { NotifyWARNBorder }, NotifyINFOIcon { NotifyINFOBorder }, NotifyDEBUGIcon { NotifyDEBUGBorder }, NotifyTRACEIcon { NotifyTRACEBorder }, NotifyERRORTitle { NotifyERRORBorder }, NotifyWARNTitle { NotifyWARNBorder }, NotifyINFOTitle { NotifyINFOBorder }, NotifyDEBUGTitle { NotifyDEBUGBorder }, NotifyTRACETitle { NotifyTRACEBorder }, TelescopeMultiSelection { fg = PmenuSel.fg, bg = ui_important_local }, TelescopeMultiSelection { fg = ui_important_local.readable(), bg = ui_important_local }, WhichKey { fg = ui_important_global }, -- the key WhichKeyGroup { fg = ui_important_local }, -- a group WhichKeySeparator { fg = ui_minor }, -- the separator between the key and its label WhichKeyDesc { fg = ui_normal }, -- the label of the key WhichKeyFloat { NormalFloat }, -- Normal in the popup window WhichKeyBorder { FloatBorder }, -- Normal in the popup window WhichKeyValue { Comment }, -- used by plugins that provide values WhichKey { fg = ui_important_global }, WhichKeyGroup { fg = ui_important_local }, WhichKeySeparator { fg = ui_minor }, WhichKeyDesc { fg = ui_normal }, WhichKeyFloat { NormalFloat }, WhichKeyBorder { FloatBorder }, WhichKeyValue { Comment }, IblIndent { Whitespace }, IblWhitespace { Whitespace }, IblScope { fg = ui_focus, bg = Normal.bg }, Hlargs { fg = content_important_local }, MiniStarterCurrent { fg = ui_accent.readable(), bg = ui_accent }, -- current item. MiniStarterFooter { Keyword }, -- footer units. MiniStarterHeader { Comment }, -- header units. MiniStarterInactive { fg = content_unfocus }, -- inactive item. MiniStarterItem { Normal }, -- item name. MiniStarterItemBullet { Whitespace }, -- units from |MiniStarter.gen_hook.adding_bullet|. MiniStarterItemPrefix { fg = content_focus, gui = '' }, -- unique query for item. MiniStarterSection { fg = content_important_global, gui = 'underline' }, -- section units. MiniStarterQuery { fg = content_accent.readable(), bg = content_accent }, -- current query in active items.deleted file mode 100644+0 / −19 text lines
local auto = require 'std.auto'auto 'highlight_yanked_text' { description = 'briefly highlight yanked text', events = 'TextYankPost', pattern = '*', command = function() vim.highlight.on_yank { timeout = 500 } end,}auto 'disable_colorcolumn_in_special_buffers' { description = 'Hide colorcolumn in buffers, that do not show source code.', events = { 'FileType' }, pattern = 'lazy,noice,Trouble,qf,help,toggleterm', command = function() vim.opt_local.colorcolumn = {} end,}+38 / −4 text lines
-- keep distance to borders while scrollingauto 'load_project_if_available' { description = 'Loads the project root dir as cwd, if it can be determined from a file path.', events = { 'FileType' }, pattern = '*', command = function ( event ) local project = require 'std.project' local ignored = require 'std.ignored' local table = require 'std.table' local buffer = event.buf local file = event.file local filetype = vim.api.nvim_buf_get_option( buffer, 'filetype' ) if table.contains( ignored.filetypes, filetype ) then return end local buftype = vim.api.nvim_buf_get_option( buffer, 'buftype' ) if table.contains( ignored.buftypes, buftype ) then return end local root = project.find_root_by_filetype( file, filetype ) local cwd = vim.uv.cwd() if root and cwd ~= root then vim.uv.chdir( root ) vim.notify( 'Changed root directory to ' .. root ) -- vim.print( buffer, file, vim.inspect( filetype ), vim.inspect( buftype ) ) end end,}+0 / −1 text lines
+132 / −108 text lines
description = 'Insert newline under cursor', category = 'editing', keys = '<C-enter>', command = function() local current_buffer = 0 local current_line = vim.api.nvim_win_get_cursor(current_buffer)[1] local strict_indexing = false local newline = { '' } vim.api.nvim_buf_set_lines(current_buffer, current_line, current_line, strict_indexing, newline) end, description = 'Insert newline under cursor', category = 'editing', keys = '<C-enter>', command = function () local current_buffer = 0 local current_line = vim.api.nvim_win_get_cursor( current_buffer )[1] local strict_indexing = false local newline = { '' } vim.api.nvim_buf_set_lines( current_buffer, current_line, current_line, strict_indexing, newline ) end, description = 'Insert newline above cursor', category = 'editing', keys = '<C-S-enter>', command = function() local current_buffer = 0 local current_line = vim.api.nvim_win_get_cursor(current_buffer)[1] - 1 local strict_indexing = false local newline = { '' } vim.api.nvim_buf_set_lines(current_buffer, current_line, current_line, strict_indexing, newline) end, description = 'Insert newline above cursor', category = 'editing', keys = '<C-S-enter>', command = function () local current_buffer = 0 local current_line = vim.api.nvim_win_get_cursor( current_buffer )[1] - 1 local strict_indexing = false local newline = { '' } vim.api.nvim_buf_set_lines( current_buffer, current_line, current_line, strict_indexing, newline ) end, description = 'yank into system clipboard', category = 'editing', keys = '<leader>y', command = '"+y',}map.normal.visual { description = 'yank line into system clipboard', category = 'editing', keys = '<leader>yy', command = '"+Y',}map.normal.visual { description = 'paste before from system clipboard', category = 'editing', keys = '<leader>p', command = '"+p',}map.normal.visual { description = 'paste after from system clipboard', category = 'editing', keys = '<leader>P', command = '"+P', ---@diagnostic disable-next-line: missing-parameter local file_under_cursor = vim.fn.expand '<cfile>' --check that it vaguely resembles an URI if file_under_cursor and file_under_cursor:match '%a+://.+' then local Job = require 'plenary.job' local job = Job:new { command = browser, args = { file_under_cursor }, on_exit = function() vim.notify('Openend ' .. file_under_cursor) end, } job:start() end ---@diagnostic disable-next-line: missing-parameter local file_under_cursor = vim.fn.expand '<cfile>' --check that it vaguely resembles an URI ---@diagnostic disable-next-line: param-type-mismatch if file_under_cursor and file_under_cursor:match '%a+://.+' then vim.system( ---@diagnostic disable-next-line: assign-type-mismatch { 'firefox', file_under_cursor }, { text = true }, function ( completed ) if completed.code == 0 then vim.notify( 'Openend ' .. file_under_cursor ) else error( 'Failed to open ' .. file_under_cursor .. ' because: ' .. completed.stderr ) end end ) end description = 'Toggle dark/light theme variant', category = 'ui', keys = '<leader>tt', command = function() if vim.opt.background:get() == 'dark' then vim.opt.background = 'light' else vim.opt.background = 'dark' end vim.notify('Toggled background to ' .. vim.opt.background:get() .. '.') end, description = 'Dismiss current search highlight', category = 'search', keys = '<esc><esc>', command = function () vim.cmd [[ nohlsearch ]] end,}map.normal { description = 'Toggle dark/light theme variant', category = 'ui', keys = '<leader>tt', command = function () if vim.opt.background:get() == 'dark' then vim.opt.background = 'light' else vim.opt.background = 'dark' end vim.notify( 'Toggled background to ' .. vim.opt.background:get() .. '.' ) end,map.normal { description = 'Run save actions', category = 'edit', keys = '<c-s>', command = function () -- trim vim.cmd 'TrimTrailingWhitespace' -- format vim.lsp.buf.format { async = false } -- TODO: run makeprg vim.cmd [[silent make]] -- save vim.cmd [[wa]] -- workaround for neovim bug:https://github.com/neovim/neovim/issues/25370 vim.api.nvim_feedkeys( 'zz', 'n', true ) end,}for _, toggler in ipairs( togglers ) do local option_name = toggler.options[1].name local first_char = string.sub( option_name, 1, 1 ) map.normal { description = 'Toggle ' .. option_name .. ' option', category = 'options', keys = '<leader>to' .. first_char, command = function () toggler:toggle() end, }end+50 / −50 text lines
local get_option = function(name) return vim.api.nvim_get_option_value(name, {}) endlocal set_option = function(name, value) vim.api.nvim_set_option_value(name, value, {}) endlocal toggle = function(self) vim.iter(self.options) :each(function(option) local current_value = get_option(option.name) if current_value == option.default then set_option(option.name, option.alternative) vim.notify( self.display_name .. ' ' .. toggle_on_icon ) else set_option(option.name, option.default) vim.notify( self.display_name .. ' ' .. toggle_off_icon ) end end)local toggle = function ( self ) vim.iter( self.options ) :each( function ( option ) local current_value = get_option( option.name ) if current_value == option.default then set_option( option.name, option.alternative ) vim.notify( self.display_name .. ' ' .. toggle_on_icon ) else set_option( option.name, option.default ) vim.notify( self.display_name .. ' ' .. toggle_off_icon ) end end )+73 / −14 text lines
local icon = require'std.icon'local icon = require 'std.icon'local auto = require 'std.auto'local ignored = require 'std.ignored'auto 'highlight_yanked_text' { description = 'briefly highlight yanked text', events = 'TextYankPost', pattern = '*', command = function () vim.highlight.on_yank() end,}auto 'disable_columns_in_special_buffers' { description = 'Hide columns in buffers, that do not show source code.', events = { 'FileType' }, pattern = ignored.filetypes, command = function () vim.opt_local.colorcolumn = {} vim.opt_local.signcolumn = 'no' vim.opt_local.foldcolumn = '0' vim.opt_local.number = false end,}-- TODO: this should probably live in nugu?-- local hl_to_mode = {-- n = { bg = 'black' },-- i = { bg = 'blue' },-- v = { bg = 'green' },-- }---- auto 'change_cursor_highlight_based_on_mode' {-- description = 'Changes the highlight of the cursor based on the current mode.',-- events = 'ModeChanged',-- command = function ()-- local current_mode = vim.fn.mode()-- local hl = hl_to_mode[current_mode]-- vim.notify( 'changing Cursor highlight for mode ' .. current_mode .. ' to ' .. vim.inspect( hl ) )-- if hl then-- vim.api.nvim_set_hl( 0, 'Cursor', hl )-- end-- end,-- }vim.opt.guifont = 'BlexMono_Nerd_Font:h14:#e-subpixelantialias:#h-none'new file mode 100644+8 / −0 text lines
+16 / −4 text lines
dependencies = { 'hrsh7th/nvim-cmp' }, config = function () local autopairs = require 'nvim-autopairs' autopairs.setup { disable_filetype = ignored.filetypes, check_ts = true, } local cmp_autopairs = require 'nvim-autopairs.completion.cmp' local cmp = require 'cmp' cmp.event:on( 'confirm_done', cmp_autopairs.on_confirm_done() ) endnew file mode 100644+5 / −0 text lines
+41 / −30 text lines
'hrsh7th/cmp-cmdline', ['<tab>'] = cmp.mapping( function ( fallback ) if cmp.visible() then cmp.select_next_item() elseif luasnip.expand_or_locally_jumpable() then luasnip.expand_or_jump() else fallback() end end, { 'i', 's' } ), ['<s-tab>'] = cmp.mapping( function ( fallback ) if cmp.visible() then cmp.select_prev_item() elseif luasnip.locally_jumpable( -1 ) then luasnip.jump( -1 ) else fallback() end end, { 'i', 's' } ), ['<cr>'] = cmp.mapping.confirm { select = false } cmp.setup.cmdline( '/', { mapping = cmp.mapping.preset.cmdline(), sources = { { name = 'buffer' } } } ) cmp.setup.cmdline( '?', { mapping = cmp.mapping.preset.cmdline(), sources = { { name = 'buffer' } } } ) cmp.setup.cmdline( ':', { mapping = cmp.mapping.preset.cmdline(), sources = cmp.config.sources { { name = 'path' } }, { { name = 'cmdline' } } } )new file mode 100644+5 / −0 text lines
new file mode 100644+8 / −0 text lines
+4 / −74 text lines
{ 'chrisgrieser/nvim-genghis', dependencies = { 'stevearc/dressing.nvim', 'hrsh7th/nvim-cmp', 'hrsh7th/cmp-omni', 'anuvyklack/hydra.nvim', }, keys = { '<leader>g' }, cmd = { 'New', 'Duplicate', 'NewFromSelection', 'Rename', 'Move', 'Trash', 'CopyFilename', 'CopyFilepath', 'Chmodx', }, config = function () local genghis = require 'genghis' local cmp = require 'cmp' local hydra = require 'hydra' cmp.setup.filetype( 'DressingInput', { sources = cmp.config.sources { { name = 'omni' } }, } ) local hint = [[^ Ghenigs^_yp_ copy filepath_yn_ copy filename_cx_ set executable permission_rf_ rename file_mf_ move and rename file_nf_ create new file_df_ duplicate file_tf_ trash file_ms_ move selection to new file^_<esc>_ quit]] hydra { name = 'Genghis', hint = hint, config = { color = 'teal', invoke_on_body = true, buffer = true, hint = { type = 'window', border = vim.g.border_style, position = 'middle', } }, mode = { 'n', 'x' }, body = '<leader>g', heads = { { 'yp', genghis.copyFilepath, }, { 'yn', genghis.copyFilename, }, { 'cx', genghis.chmodx, }, { 'rf', genghis.renameFile, }, { 'mf', genghis.moveAndRenameFile, }, { 'nf', genghis.createNewFile, }, { 'df', genghis.duplicateFile, }, { 'tf', genghis.trashFile, }, { 'ms', genghis.moveSelectionToNewFile }, { '<esc>', nil }, }, } end,+153 / −4 text lines
'lewis6991/gitsigns.nvim', event = 'VeryLazy', opts = { signs = { add = { text = '│' }, change = { text = '│' }, delete = { text = '_' }, topdelete = { text = '‾' }, changedelete = { text = '~' }, untracked = { text = '┆' }, }, preview_config = { border = vim.g.border_style, }, current_line_blame = true, current_line_blame_opts = { ignore_whitespace = true, }, current_line_blame_formatter = '<author>(<author_time:%d.%m.%Y>): <summary>', on_attach = function ( bufnr ) local gitsigns = require 'gitsigns' map.normal { description = 'Goto next hunk', category = 'git', keys = ']h', buffer = bufnr, command = gitsigns.next_hunk, } map.normal { description = 'Goto previous hunk', category = 'git', keys = '[h', buffer = bufnr, command = gitsigns.prev_hunk, } map.normal { description = 'Stage hunk', category = 'git', keys = '<leader>hs', buffer = bufnr, command = gitsigns.stage_hunk, } map.visual_select { description = 'Stage hunk', category = 'git', keys = '<leader>hs', buffer = bufnr, command = function () gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } end, } map.normal { description = 'Reset hunk', category = 'git', keys = '<leader>hr', buffer = bufnr, command = gitsigns.reset_hunk, } map.visual_select { description = 'Reset hunk', category = 'git', keys = '<leader>hr', buffer = bufnr, command = function () gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } end, } map.normal { description = 'Undo stage hunk', category = 'git', keys = '<leader>hu', buffer = bufnr, command = gitsigns.undo_stage_hunk, } map.normal { description = 'Stage buffer', category = 'git', keys = '<leader>hS', buffer = bufnr, command = gitsigns.stage_buffer, } map.normal { description = 'Reset buffer', category = 'git', keys = '<leader>hR', buffer = bufnr, command = gitsigns.reset_buffer, } map.normal { description = 'Preview hunk', category = 'git', keys = '<leader>hp', buffer = bufnr, command = gitsigns.preview_hunk, } map.normal { description = 'Blame line', category = 'git', keys = '<leader>hb', buffer = bufnr, command = function () gitsigns.blame_line { full = true } end, } map.normal { description = 'Diff this', category = 'git', keys = '<leader>hd', buffer = bufnr, command = gitsigns.diffthis, } map.normal { description = 'Diff this ~', category = 'git', keys = '<leader>hD', buffer = bufnr, command = function () gitsigns.diffthis '~' end, } map.normal { description = 'Toggle current line blame', category = 'git', keys = '<leader>tb', buffer = bufnr, command = gitsigns.toggle_current_line_blame, } map.normal { description = 'Toggle deleted', category = 'git', keys = '<leader>td', buffer = bufnr, command = gitsigns.toggle_deleted, } map.operator_pending.visual { description = 'select hunk', category = 'git', keys = 'ih', buffer = bufnr, command = ':<C-U>Gitsigns select_hunk<CR>' } end, }deleted file mode 100644+0 / −13 text lines
+16 / −12 text lines
return { "lukas-reineke/indent-blankline.nvim" , event = { 'BufReadPost', 'BufNew' }, config = function() local indent_blankline = require'indent_blankline'local icon = require'std.icon'+3 / −3 text lines
+1 / −1 text lines
new file mode 100644+4 / −0 text lines
deleted file mode 100644+0 / −27 text lines
return { 'smoka7/multicursors.nvim', event = 'VeryLazy', dependencies = { 'nvim-treesitter/nvim-treesitter', 'anuvyklack/hydra.nvim', }, opts = { hint_config = { border = vim.g.border_style, }, generate_hints = { normal = true, insert = false, extend = false, } }, cmd = { 'MCstart', 'MCvisual', 'MCclear', 'MCpattern', 'MCvisualPattern', 'MCunderCursor' }, keys = { { mode = { 'v', 'n' }, '<c-n>', '<cmd>MCstart<cr>', desc = 'Create a selection for selected text or word under the cursor', }, },}+22 / −22 text lines
'AckslD/nvim-neoclip.lua', event = 'TextYankPost', keys = {'y', '<C-v><C-v>' }, dependencies = { 'nvim-telescope/telescope.nvim', }, config = function() local neoclip = require'neoclip' local telescope = require'telescope' local themes = require 'telescope.themes' local cursor = themes.get_cursor { layout_config = { preview_width = 0.42, width = 0.69 } } 'AckslD/nvim-neoclip.lua', event = 'TextYankPost', keys = { 'y', '<C-v><C-v>' }, dependencies = { 'nvim-telescope/telescope.nvim', }, config = function () local neoclip = require 'neoclip' local telescope = require 'telescope' local themes = require 'telescope.themes' local cursor = themes.get_cursor { layout_config = { preview_width = 0.69, width = 0.42 } }+22 / −35 text lines
-- does not seem to play well with other popups? -- does not seem to play well with other popups? -- treesitter in particular { filter = { event = 'msg_show', kind = '', find = 'written', }, opts = { skip = true }, }, { filter = { event = 'msg_show', kind = 'quickfix' }, opts = { skip = true }, }, { filter = { event = 'msg_show', find = 'E42' }, opts = { skip = true }, }, { filter = { event = 'msg_show', kind = '', find = '^".*" %[.*%]', }, opts = { skip = true }, }, { filter = { event = 'notify', min_height = 15 }, view = 'split', }, filter = { any = { { cmdline = '^:%s*lua%s+' }, { cmdline = '^:%s*lua%s*=%s*' }, { cmdline = '^:%s*=%s*' }, } }, ---@diagnostic disable-next-line: param-type-mismatch ---@diagnostic disable-next-line: missing-fields+1 / −1 text lines
new file mode 100644+3 / −0 text lines
+0 / −1 text lines
+42 / −41 text lines
'stevearc/oil.nvim', lazy = false, -- event = 'VeryLazy', dependencies = { "nvim-tree/nvim-web-devicons" }, config = function() local oil = require'oil' oil.setup{ skip_confirm_for_simple_edits = true, -- delete_to_trash = true, -- trash_command = 'rm', --nu command 'stevearc/oil.nvim', branch = 'stevearc-trash', keys = '-', cmd = { 'Oil' }, dependencies = { 'nvim-tree/nvim-web-devicons' }, config = function () local oil = require 'oil' oil.setup { skip_confirm_for_simple_edits = true, delete_to_trash = true, -- trash_command = 'rm --trash', --nu command colums = { "icon", "permissions", "size", "mtime", }, keymaps = { ["q"] = "actions.close", ["<esc>"] = "actions.close", ["<C-/>"] = "actions.show_help", ["<C-_>"] = "actions.show_help", ["<C-?>"] = "actions.show_help", ["<C-v>"] = "actions.select_vsplit", ["<C-x>"] = "actions.select_split", ["<C-h>"] = "actions.toggle_hidden", }, float = { border = vim.g.border_style, padding = 2, -- win_options = { winblend = vim.o.winblend }, }, } colums = { 'icon', 'permissions', 'size', 'mtime', }, keymaps = { ['q'] = 'actions.close', ['<esc>'] = 'actions.close', ['<C-/>'] = 'actions.show_help', ['<C-v>'] = 'actions.select_vsplit', ['<C-s>'] = 'actions.select_split', ['<C-h>'] = 'actions.toggle_hidden', }, float = { max_width = 69, min_width = 42, border = vim.g.border_style, padding = 2, win_options = { winblend = vim.o.winblend }, }, }+2 / −2 text lines
new file mode 100644+85 / −0 text lines
local auto = require 'std.auto'local icon = require 'std.icon'return { 'echasnovski/mini.starter', lazy = false, config = function () local starter = require 'mini.starter' local is_home = vim.uv.cwd() == vim.uv.os_homedir() local custom_actions = { { name = 'Find files', action = 'Telescope find_files', section = 'Builtin actions' }, { name = 'Oil', action = 'Oil', section = 'Builtin actions' }, } local sessions = function ( limit ) limit = limit or 8 local persistence = require 'persistence' local persistence_config = require 'persistence.config' local sessions = persistence.list() table.sort( sessions, function ( a, b ) return vim.loop.fs_stat( a ).mtime.sec > vim.loop.fs_stat( b ).mtime.sec end ) return vim.iter( sessions ) :slice( 1, limit ) :map( function ( session_path ) -- session files encode their cwd as an escaped path in their file name -- t = tail of name -- r = remove extension -- gs = replace all % with / -- ~ = relative to home local name = vim.fn.fnamemodify( session_path, ':t:r:gs_%_/_:~' ) local session_restore = 'silent! source ' .. vim.fn.fnameescape( session_path ) local action = function () vim.cmd( session_restore ) vim.notify( 'Restored session: ' .. name ) end local section = 'Sessions' return { name = name, action = action, section = section } end ) :totable() end starter.setup { footer = (function () local startuptime auto 'display_startup_time' { description = 'Display startup time on starter screen', events = 'User', pattern = 'LazyVimStarted', once = true, command = vim.schedule_wrap( function () startuptime = require 'lazy'.stats().startuptime starter.refresh() end ), } return function () return icon.start .. ' ' .. (startuptime or ' ') .. 'ms' end end)(), header = [[███ ▄ ▄▀ ██ ███ ▄█ ▄ ▄▀ ███ █ █ ▄▀ █ █ █ █ ██ █ ▄▀ █ ██ ▀ ▄ █ █ █ ▀▄ █▄▄█ █ ▀ ▄ ██ ██ █ █ ▀▄ █▄▄██ ▄▀ █ █ █ █ █ █ █ ▄▀ ▐█ █ █ █ █ █ █ ████ █▄ ▄█ ███ █ ███ ▐ █ █ █ ███ █ ▀▀▀ █ █ ██ █ ▀ ▀]], items = { starter.sections.builtin_actions(), custom_actions, sessions, starter.sections.recent_files( is_home and 24 or 8, not is_home, is_home ), }, content_hooks = { starter.gen_hook.adding_bullet(), starter.gen_hook.aligning( 'center', 'center' ), starter.gen_hook.indexing( 'all', { 'Recent files', 'Recent files (current directory)', 'Builtin actions' } ), }, } end,}+5 / −7 text lines
new file mode 100644+5 / −0 text lines
+48 / −38 text lines
command = function() builtin.help_tags(dropdown) end,+1 / −0 text lines
+3 / −40 text lines
vim.cmd [[ command! Gitui lua Gitui() ]] --[ MDCAT ] local mdcat = Terminal:new { hidden = true, direction = 'vertical', cmd = '', } _G.Mdcat = function () local window = vim.api.nvim_get_current_win() local current_file = vim.api.nvim_buf_get_name( 0 ) mdcat.cmd = 'watch ' .. current_file .. ' { clear; mdcat ' .. current_file .. ' }' mdcat:toggle() vim.api.nvim_set_current_win( window ) end vim.cmd [[ command! Mdcat lua Mdcat() ]] -- [ GRAPHVIZ ] local graphviz = Terminal:new { hidden = true, direction = 'vertical', cmd = '', } _G.Graphviz = function () local window = vim.api.nvim_get_current_win() local current_file = vim.api.nvim_buf_get_name( 0 ) graphviz.cmd = 'watch ' .. current_file .. ' { clear; dot -O -Tpng ' .. current_file .. ' ; viu --blocks ' .. current_file .. '.png }' graphviz:toggle() vim.api.nvim_set_current_win( window ) end vim.cmd [[ command! Graphviz lua Graphviz() ]] vim.api.nvim_create_user_command( 'Gitui', toggle_gitui, { desc = 'Toggle Gitui' } )+40 / −52 text lines
event = 'BufRead', cmd = { 'TSBufDisable', 'TSBufEnable', 'TSBufToggle', 'TSDisable', 'TSEnable', 'TSToggle', 'TSInstall', 'TSInstallInfo', 'TSInstallSync', 'TSModuleInfo', 'TSUninstall', 'TSUpdate', 'TSUpdateSync', 'TSPlaygroundToggle', 'TSHighlightCapturesUnderCursor', 'TSNodeUnderCursor', }, event = { 'BufReadPre', 'BufNewFile'}, ['at'] = { query = '@comment.outer', desc = 'Select outer comment' }, ['as'] = { query = '@scope', query_group = 'locals', desc = 'Select language scope' }, -- l overwrites builtin. i have no good idea for better binding. use ia instead. -- ['la'] = { query = '@assignment.lhs', desc = 'left hand side of assignment'}, -- ['ra'] = { query = '@assignment.rhs', desc = 'right hand side of assignment'}, ['ac'] = { query = '@class.outer', desc = 'outer class' }, ['ic'] = { query = '@class.inner' , desc = 'inner class' }, ['ao'] = { query = '@conditional.outer', desc = 'outer conditional' }, ['io'] = { query = '@conditional.inner' , desc = 'inner conditional' }, ['al'] = { query = '@loop.outer', desc = 'outer loop' }, ['il'] = { query = '@loop.inner' , desc = 'inner loop' }, -- this overwrites the built-in 'paragraph' object ['ap'] = { query = '@parameter.outer', desc = 'outer parameter' }, ['ip'] = { query = '@parameter.inner' , desc = 'inner parameter' }, ['at'] = { query = '@comment.outer' , desc = 'outer comment' }, ['as'] = { query = '@scope', query_group = 'locals', desc = 'language scope' }, ['<leader>sn'] = { query = '@parameter.inner', desc = 'Swap parameter with next' }, ['<leader>spn'] = { query = '@parameter.inner' , desc = 'Swap parameter with next' }, ['<leader>sp'] = { query = '@parameter.inner', desc = 'Swap parameter with previous' }, ['<leader>spp'] = { query = '@parameter.inner' , desc = 'Swap parameter with previous' }, [']f'] = { query = '@function.outer', desc = 'Goto next funtion' }, ['[f'] = { query = '@function.outer', desc = 'Goto previous function' }, local ts_repeat_move = require 'nvim-treesitter.textobjects.repeatable_move' map.normal.visual.operator_pending { description = 'This repeats the last query with always previous direction and to the start of the range.', keys = '<PageUp>', category = 'textobjects', command = function () ts_repeat_move.repeat_last_move { forward = false } end } map.normal.visual.operator_pending { description = 'This repeats the last query with always next direction and to the end of the range.', keys = '<PageDown>', category = 'textobjects', command = function () ts_repeat_move.repeat_last_move { forward = true } end }+9 / −1 text lines
char = '│',+44 / −7 text lines
local icon = require 'std.icon'--TODO: add which-key highlights in nugu layout = { align = 'center' }, } }, config = function ( _, opts ) local wk = require 'which-key' wk.setup( opts ) -- TODO: how can my own map api be used to generate the following wk prefixes? -- map should not depend on wk. -- can map cache mappings to read here? -- use category as prefix? wk.register { ['<leader>'] = { m = { name = 'mark', _ = 'which_key_ignore' }, h = { name = 'hunk', _ = 'which_key_ignore' }, l = { name = 'lsp', _ = 'which_key_ignore' }, s = { name = 'swap', _ = 'which_key_ignore', { p = { name = 'parameter', _ = 'which_key_ignore' }, }, }, t = { name = 'toggle', _ = 'which_key_ignore', { o = { name = 'options', _ = 'which_key_ignore' }, } }, z = { name = 'lazy', _ = 'which_key_ignore' }, [' '] = { name = 'fun', _ = 'which_key_ignore' }, } } end+42 / −50 text lines
local display = require 'std.display'return want{ 'nui.popup', 'nui.text', 'nui.line',}( function( NuiPopup, NuiText, NuiLine ) local get_nui_popup = function() local popup = NuiPopup{ relative = 'editor', focusable = true, position= '50%', enter = true, size = { width = '69%', height = '42%', }, border = { style = vim.g.border_style, }, buf_options = { modifiable = true, readonly = false, } } popup:map("n", "q", function() popup:unmount() end, { noremap = true }) return popuplocal NuiPopup = require 'nui.popup'local NuiText = require 'nui.text'local NuiLine = require 'nui.line'local get_nui_popup = function () local popup = NuiPopup { relative = 'editor', focusable = true, position = '50%', enter = true, size = { width = '69%', height = '42%', }, border = { style = vim.g.border_style, }, buf_options = { modifiable = true, readonly = false, } } popup:map( 'n', 'q', function () popup:unmount() end, { noremap = true } ) return popupendreturn { show_tree = function ( tree ) local popup = get_nui_popup() local bufnr = popup.bufnr local text, _ = display( tree ) local line_number = 1 for line in text:gmatch '[^\r\n]+' do local nui_line = NuiLine() nui_line:append( NuiText( line, 'NormalFloat' ) ) nui_line:render( bufnr, -1, line_number ) line_number = line_number + 1 return { show_tree = function(tree) local popup = get_nui_popup() local bufnr = popup.bufnr local text, _ = display(tree) local line_number = 1 for line in text:gmatch('[^\r\n]+') do local nui_line = NuiLine() nui_line:append(NuiText(line, 'NormalFloat')) nui_line:render(bufnr, -1, line_number) line_number = line_number + 1 end popup:mount() end, } end)+2 / −0 text lines
+69 / −54 text lines
error = '', warn = '', info = '', hint = '', quot_left = '', quot_right = '', hash = '', checkbox_mark = '', checkbox_unmark = '', user = ' ', data = '', thread = '', ['function'] = '', ['table'] = '', toggle_on = '', toggle_off = '', diagnostic = '⊙', spelling = '', linenumber = '', linehighlight = '', modified = '', lock = '', file = '', newline = '', lsp = '', subversion = '', vim = '', branch = '', git = '', diff_add = '', diff_remove = '', diff_change = '', folder = '', terminal = '', macro = '', lazy = '', global = '', ['local'] = '', space = '⋅', eol = '↴', tab = '', trail = '•', extends = '❯', precedes = '❮', nbsp = '␣', normal = 'Ν', visual = '', insert = '', select = '', replace = '', command = '', pending = '', exclaim = '', checkbox_mark = '', checkbox_unmark = '', command = '', close = '', block = '█', data = '', diagnostic = '⊙', diff_add = '', diff_change = '', diff_remove = '', eol = '↴', error = '', exclaim = '', extends = '❯', file = '', folder = '', git = '', global = '', group = '', hash = '', hint = '', info = '', insert = '', lazy = '', linehighlight = '', linenumber = '', lock = '', lsp = '', macro = '', modified = '', nbsp = '␣', newline = '', normal = 'Ν', pending = '', precedes = '❮', quot_left = '', quot_right = '', replace = '', select = '', space = '⋅', spelling = '', subversion = '', tab = '', terminal = '', thread = '', toggle_off = '', toggle_on = '', trail = '•', user = ' ', vertical_bar = '│', vim = '', virtual = '', visual = '', warn = '', space_key = '', return_key = '', tab_key = '', esc_key = '', backspace_key = '', leader_key = '', start = '', slant_left = '▟', slant_right = '▙',+17 / −14 text lines
+4 / −1 text lines
+64 / −53 text lines
local ignored = require 'std.ignored'---@param stop string? The last directory on the path to root, when to stop searching. if `nil`, the users home---@return string? # Directory, that contains the `markers` and lies on the path from `path` to `stop`. if not exists(stop) then error(('the stop directory %s does not exist!'):format(stop)) end if not exists( stop ) then error( ('the stop directory %s does not exist!'):format( stop ) ) end local cache_hit = cache_get(path, markers) vim.notify(('searching for markers reached the max traversal count for path %s !'):format(path)) vim.notify( ('searching for markers reached the max traversal count for path %s !'):format( path ) )---@return string? # The project root of the current buffer, or `nil`, if none could be determined.local function find_project_root(path, markers)local function find_project_root( path, markers ) return find_root(path, join(default_markers, markers))-- TODO: how to get a marker for luarocks stuff? local cargo_crate_dir = find_root(path, markers) local cargo_crate_dir = find_root( path, markers ) vim.fs.joinpath(cargo_crate_dir, 'Cargo.toml'), vim.fs.joinpath( cargo_crate_dir, 'Cargo.toml' ), local result = vim.system(cmd, { text = true }):wait() local result = vim.system( cmd, { text = true } ):wait() cargo_workspace_root = vim.fs.normalize(json['workspace_root']) cargo_workspace_root = vim.fs.normalize( json['workspace_root'] )local fallback_rooter = function ( path ) return find_vcs_project_root( path ) or find_project_root( path )endlocal rooters = { java = find_java_project_root, lua = find_lua_project_root, rust = find_rust_project_root, zig = find_zig_project_root,}local find_root_by_filetype = function ( path, filetype ) local rooter = rooters[filetype] return rooter and rooter( path ) or fallback_rooter( path )end find_root_by_filetype = find_root_by_filetype, find_lua_nvim_project_root = find_lua_nvim_project_root,deleted file mode 100644+0 / −29 text lines
--- attempts to import modules with the given names.---@param module_names string|table name or list of names, or a function that returns those---@return function function that takes a function that takes in the modules listed by `module_names`return function ( module_names ) return function ( block, error_handler ) local loaded_modules = {} local failed_modules = {} if type( module_names ) == 'string' then module_names = { module_names } end for _, name in pairs( module_names ) do local status_ok, module = pcall( require, name ) if status_ok then table.insert( loaded_modules, module ) else table.insert( failed_modules, module ) end end if #failed_modules > 0 then return error_handler and type( error_handler ) == 'function' and error_handler( unpack( failed_modules ) ) or error_handler else for _, module in pairs( failed_modules ) do vim.notify( 'A wanted module failed to load: ' .. module, 'error' ) end end return block and block( unpack( loaded_modules ) ) endenddeleted file mode 100644No text changes.
+0 / −3 text lines
+5 / −2 text lines
+9 / −1 text lines
new file mode 100644+39 / −0 text lines
# this file is both a valid# - overlay which can be loaded with `overlay use starship.nu`# - module which can be used with `use starship.nu`# - script which can be used with `source starship.nu`export-env { load-env { STARSHIP_SHELL: "nu" STARSHIP_SESSION_KEY: (random chars -l 16) PROMPT_MULTILINE_INDICATOR: ( ^/home/oli/.cargo/bin/starship prompt --continuation ) # Does not play well with default character module. # TODO: Also Use starship vi mode indicators? PROMPT_INDICATOR: "" PROMPT_COMMAND: {|| # jobs are not supported ( ^/home/oli/.cargo/bin/starship prompt --cmd-duration $env.CMD_DURATION_MS $"--status=($env.LAST_EXIT_CODE)" --terminal-width (term size).columns ) } config: ($env.config? | default {} | merge { render_right_prompt_on_last_line: true }) PROMPT_COMMAND_RIGHT: {|| ( ^/home/oli/.cargo/bin/starship prompt --right --cmd-duration $env.CMD_DURATION_MS $"--status=($env.LAST_EXIT_CODE)" --terminal-width (term size).columns ) }}}+4 / −5 text lines
diff-cmd = /home/oli/.subversion/diff+1 / −2 text lines
# TODO windows versions as bat files+1 / −1 text lines