From 6b5355b370b588df07191d938c102c0b99fb552b Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 3 Aug 2022 11:38:32 -0500 Subject: [PATCH] Back --- common/fish/functions.fish | 1 + common/fish/vars.fish | 15 ++++++--------- common/helix/config.toml | 19 ++++++------------- common/helix/languages.toml | 15 ++++++++++++++- common/neovim/init.lua | 2 +- os/linux/kanshi/config | 4 ++-- os/linux/sway/config | 2 +- todo.md | 14 ++++++++++++++ 8 files changed, 45 insertions(+), 27 deletions(-) diff --git a/common/fish/functions.fish b/common/fish/functions.fish index 44c27e2..58ed57d 100644 --- a/common/fish/functions.fish +++ b/common/fish/functions.fish @@ -164,6 +164,7 @@ alias dd "dd status=progress" alias year 'cal (date +%Y)' alias mount 'sudo -E mount' alias umount 'sudo -E umount' +alias ip 'ip -color' has_command xdg-open && alias open xdg-open has_command docker && begin diff --git a/common/fish/vars.fish b/common/fish/vars.fish index 626f852..60a0be6 100644 --- a/common/fish/vars.fish +++ b/common/fish/vars.fish @@ -9,21 +9,18 @@ set --export --universal TERMINAL kitty set --export --universal TERMINAL_ARGS '--single-instance' set --export --universal BROWSER firefox-developer-edition -set --export --universal PAGER less -set --export --universal LESS "-r" +set --export --universal PAGER "less" +set --export --universal MANPAGER "less" -set --export --universal MANPAGER 'env MANWIDTH="" "$EDITOR"' - -if command --search --quiet helix +if command --search --quiet nvim + set --export --universal EDITOR nvim + set --export --universal VISUAL nvim +else if command --search --quiet helix set --export --universal EDITOR helix set --export --universal VISUAL helix else if command --search --quiet hx set --export --universal EDITOR hx set --export --universal VISUAL hx -else if command --search --quiet nvim - set --export --universal MANPAGER 'env MANWIDTH="" nvim --cmd "let g:prosession_on_startup=0" +Man!' - set --export --universal EDITOR nvim - set --export --universal VISUAL nvim else if command --search --quiet vim set --export --universal EDITOR vim set --export --universal VISUAL vim diff --git a/common/helix/config.toml b/common/helix/config.toml index e619530..b60edd8 100644 --- a/common/helix/config.toml +++ b/common/helix/config.toml @@ -5,10 +5,10 @@ auto-pairs = false scrolloff = 8 rulers = [80, 120] -# [editor.cursor-shape] -# normal = "block" -# insert = "bar" -# select = "underline" +[editor.cursor-shape] +normal = "block" +insert = "bar" +select = "underline" [editor.file-picker] hidden = false @@ -20,17 +20,10 @@ k = { k = "normal_mode", j = "normal_mode", K = "normal_mode", J = "normal_mode" K = { k = "normal_mode", j = "normal_mode", K = "normal_mode", J = "normal_mode" } [keys.normal] -g = { G = "goto_last_line" } D = "kill_to_line_end" -C = ["kill_to_line_end", "insert_mode"] +# C = ["kill_to_line_end", "insert_mode"] "^" = "goto_line_start" "C-k" = "jump_view_up" "C-j" = "jump_view_down" "C-h" = "jump_view_left" -"C-l" = "jump_view_right" - -[keys.select] -g = { G = "goto_last_line" } - -# [editor] -# mouse = false +"C-l" = "jump_view_right" \ No newline at end of file diff --git a/common/helix/languages.toml b/common/helix/languages.toml index 2392086..80dc7c5 100644 --- a/common/helix/languages.toml +++ b/common/helix/languages.toml @@ -8,4 +8,17 @@ language-server = { command = "denopoo", args = ["lsp"] } config = { deno = { enable = true, lint = true } } comment-token = "//" indent = { tab-width = 2, unit = " " } -grammar = "javascript" \ No newline at end of file +grammar = "javascript" + +[[language]] +name = "elixir" +scope = "source.elixir" +injection-regex = "(elixir|ex)" +file-types = ["ex", "exs", "mix.lock"] +shebangs = ["elixir"] +roots = [] +comment-token = "#" +auto-format = true +language-server = { command = "elixir-ls" } +config = { elixirLS.dialyzerEnabled = true } +indent = { tab-width = 2, unit = " " } \ No newline at end of file diff --git a/common/neovim/init.lua b/common/neovim/init.lua index d6aee91..8767120 100644 --- a/common/neovim/init.lua +++ b/common/neovim/init.lua @@ -1,7 +1,7 @@ vim.g.vimdir = os.getenv('XDG_CONFIG_HOME') .. '/nvim' +-- ensure our plugin manager plugin is installed local packer_install_path = vim.fn.stdpath 'data' .. '/site/pack/packer/start/packer.nvim' - if #vim.fn.glob(packer_install_path) == 0 then vim.fn.system { 'git', 'clone', 'https://github.com/wbthomason/packer.nvim', packer_install_path } vim.cmd 'packadd packer.nvim' diff --git a/os/linux/kanshi/config b/os/linux/kanshi/config index fd507ed..5d857f1 100644 --- a/os/linux/kanshi/config +++ b/os/linux/kanshi/config @@ -24,8 +24,8 @@ profile desktop-H-2x4kside2 { # } profile desktop-primary { - output "Dell Inc. DELL U2720Q CWTM623" enable mode 3840x2160@60Hz position 0,500 scale 1.5 transform 90 - output "Samsung Electric Company SyncMaster H1AK500000" enable mode 3840x2160@60Hz position 1440,0 scale 1.0 transform normal + output "Dell Inc. DELL U2720Q CWTM623" enable mode 3840x2160@59.997Hz position 0,500 scale 1.5 transform 90 + output "Samsung Electric Company SyncMaster H1AK500000" enable mode 3840x2160@59.997Hz position 1440,0 scale 1.0 transform normal } profile tv4k { diff --git a/os/linux/sway/config b/os/linux/sway/config index aa4d2f8..3772d9c 100644 --- a/os/linux/sway/config +++ b/os/linux/sway/config @@ -49,7 +49,7 @@ bindsym $mod+shift+alt+return exec kitty bindsym $mod+c kill bindsym $mod+shift+c kill # TODO: kill -9? bindsym $mod+shift+space exec wofi --show drun -bindsym $mod+space exec app-launcher +bindsym $mod+space exec wofi --show drun bindsym $mod+shift+s exec clipshot bindsym $mod+e exec thunar bindsym $mod+shift+r reload diff --git a/todo.md b/todo.md index fec7f8e..5dcdc58 100644 --- a/todo.md +++ b/todo.md @@ -17,3 +17,17 @@ the browser. - This goes for navigating "into" a file in `nnn` - Investigate systemd services that may help with various tasks (homed, etc.) + +## Helix + +Here are some things Helix doesn't do well that are common use cases for my +Neovim setup: + +- Session management: https://github.com/helix-editor/helix/issues/401 +- "Infinite" undo persistence + - I want to be able to open a file, make changes, save it, close helix, re- + open that same file and still be able to undo all the changes I made - one + might argue that I should just use git better, and you would be right, but this + is something I've come to rely on for the time being +- Usable as PAGER, VISUAL, MANPAGER, GIT_PAGER, etc: https://github.com/helix-editor/helix/issues/1074 +- The ability to `:reflow` with indentation taken into account?