repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

nushell: removed some unused options from config

b9bdea8690aa2883a40f2d0c2f733fd05d17c07d

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (5)

helix/config.toml

Modified
1 -theme = "nugu-dark"
1 +theme = "nugu-light"
3 3 [editor]
4 4 shell = ["nu", "--commands"]

neovim/lua/bugabinga/options/shell.lua

Modified
1 1 if vim.fn.executable 'nu' then
2 - -- integrate Nushell with nvim
3 - vim.opt.shell = 'nu'
4 - -- flags for nu:
5 - -- * `--stdin` redirect all input to -c
6 - -- * `--no-newline` do not append `\n` to stdout
7 - -- * `--commands` execute a command
8 - vim.opt.shellcmdflag = '--stdin --no-newline --commands'
9 - -- string to be used to put the output of shell commands in a temp file
10 - -- 1. when 'shelltemp' is `true`
11 - -- 2. in the `diff-mode` (`nvim -d file1 file2`) when `diffopt` is set
12 - -- to use an external diff command: `set diffopt-=internal`
13 - vim.opt.shellredir = 'out+err> "%s"'
14 - -- string to be used with `:make` command to:
15 - -- 1. save the stderr of `makeprg` in the temp file which Neovim reads using `errorformat` to populate the `quickfix` buffer
16 - -- 2. show the stdout, stderr on the screen
17 - -- NOTE: `ansi strip` removes all ansi coloring from nushell errors
18 - vim.opt.shellpipe =
19 - '| complete | get stderr stdout | str join (char nl) | ansi strip | tee { save --force --raw "%s" }'
20 - -- WARN: disable the usage of temp files for shell commands
21 - -- because Nu doesn't support `input redirection` which Neovim uses to send buffer content to a command:
22 - -- `{shell_command} < {temp_file_with_selected_buffer_content}`
23 - -- When set to `false` the stdin pipe will be used instead.
24 - -- NOTE: some info about `shelltemp`: https://github.com/neovim/neovim/issues/1008
25 - vim.opt.shelltemp = false
26 - vim.opt.shellxquote = ''
27 - vim.opt.shellxescape = ''
28 - vim.opt.shellquote = ''
2 + -- integrate Nushell with nvim
3 + vim.opt.shell = 'nu'
4 + -- flags for nu:
5 + -- * `--stdin` redirect all input to -c
6 + -- * `--no-newline` do not append `\n` to stdout
7 + -- * `--commands` execute a command
8 + vim.opt.shellcmdflag = '--stdin --no-newline --commands --error-style plain --table-mode none'
9 + -- string to be used to put the output of shell commands in a temp file
10 + -- 1. when 'shelltemp' is `true`
11 + -- 2. in the `diff-mode` (`nvim -d file1 file2`) when `diffopt` is set
12 + -- to use an external diff command: `set diffopt-=internal`
13 + vim.opt.shellredir = 'out+err> "%s"'
14 + -- string to be used with `:make` command to:
15 + -- 1. save the stderr of `makeprg` in the temp file which Neovim reads using `errorformat` to populate the `quickfix` buffer
16 + -- 2. show the stdout, stderr on the screen
17 + -- NOTE: `ansi strip` removes all ansi coloring from nushell errors
18 + vim.opt.shellpipe =
19 + '| complete | get stderr stdout | str join (char nl) | ansi strip | tee { save --force --raw "%s" }'
20 + -- WARN: disable the usage of temp files for shell commands
21 + -- because Nu doesn't support `input redirection` which Neovim uses to send buffer content to a command:
22 + -- `{shell_command} < {temp_file_with_selected_buffer_content}`
23 + -- When set to `false` the stdin pipe will be used instead.
24 + -- NOTE: some info about `shelltemp`: https://github.com/neovim/neovim/issues/1008
25 + vim.opt.shelltemp = false
26 + vim.opt.shellxquote = ''
27 + vim.opt.shellxescape = ''
28 + vim.opt.shellquote = ''
31 31 require 'bugabinga.health'.add_dependency
33 33 name = 'Nushell',
34 34 name_of_executable = 'nu',

nushell/config.nu

Modified
1 1 $env.config = {
2 - #color_config: $nugu_theme # TODO: generate nugu theme
3 - use_ansi_coloring: true
4 2 edit_mode: vi
5 3 show_banner: false
6 4 table: {
7 - mode: none
5 + mode: markdown
9 7 rm: {
10 8 always_trash: true
12 - completions: {
13 - use_ls_colors: true
14 - }
15 10 cursor_shape: {
16 11 vi_insert: line
17 12 vi_normal: block
23 18 # unfortunatelly, this seems to be buggy on win32 with wezterm
24 19 osc133: ($nu.os-info.family | str contains "unix")
26 - # some experimental options
27 - buffer_editor: ["nvim" "--clean"]
28 22 highlight_resolved_externals : true
29 23 use_kitty_protocol : true
32 26 file_format: "sqlite"
33 27 isolation: true
35 - hooks: {
36 - pre_prompt: [{ ||
37 - if (which direnv | is-empty) {
38 - return
39 - }
41 - ^direnv export json | from json | default {} | load-env
42 - if 'ENV_CONVERSIONS' in $env and 'PATH' in $env.ENV_CONVERSIONS {
43 - $env.PATH = do $env.ENV_CONVERSIONS.PATH.from_string $env.PATH
44 - }
45 - }]
46 - }

nushell/env.nu

Modified
32 -if not (which nvim | is-empty) {
32 +if (which nvim | is-not-empty) {
33 33 $env.EDITOR = 'nvim'
34 34 $env.GIT_EDITOR = 'nvim'
37 -if not (which neovide | is-empty) {
37 +if (which neovide | is-not-empty) {
38 38 $env.VISUAL = 'neovide'
41 -if ($env | get -i TERM_PROGRAM) == WezTerm {
42 - $env.TERM = "xterm-256color"
43 -}
45 -# theme for ls and other programs, that use LS_COLORS
46 -$env.LS_COLORS = (try { vivid generate alabaster_dark | into string } catch {""})
41 +# FIXME: what did i need that for?
42 +# if ($env | get -i TERM_PROGRAM) == WezTerm {
43 +# $env.TERM = "xterm-256color"
44 +# }
48 46 # Specifies how environment variables are:
49 47 # - converted from a string to a value on Nushell startup (from_string)

wezterm/bugabinga/dotfiles_workspace.lua

Modified
9 9 cwd = dotfiles_path,
12 - wez.mux.set_active_workspace 'dotfiles'
12 + -- wez.mux.set_active_workspace 'dotfiles'
13 13 window:gui_window():maximize()
14 14 end )