Long Time No See: Need help updating configuration

Hey gang,

Been awhile! I find myself curious about editors again, although it’s more so of an attempt to create a sane (at least to me) configuration for a lot of them, Kakoune being one. My main editor is Emacs, as I’ve just known it for so long and Org-Mode is great, but Kakoune scratches an itch for when I don’t want/need to use Emacs whereas similar editors I find myself smacking myself in the face in frustration.

Now I have some a lot of configurations for Kakoune that I haven’t touched in a minute. I would like to change this, and update this in places necessary.

My main questions to you all here is:

  1. What’s been updated in the ecosystem?
  2. Are we still using plug.kak for plugins, if you aren’t rolling something together yourself?
  3. (Optional) Take a look at the configurations I have in the linked repo, and what would you change about the
    a. structure
    b. configurations?

Hope y’all are doing well!

Hi !

1.Hadronized seems to be hard at work on kts (Kak TreeSitter), that’s the one big plugin I’ve been willing to checkout for long but haven’t found the will and time too.
2. Yes. I even use it when I am rolling something together for myself, if it’s independent enough. And I really don’t have much to roll, but making a plugin is that easy.
3.b. If you updated your kakoune, you probably realized it yourself already, but space and comma have swapped meaning, you no longer need to swap them yourself.

I’m definitely stealing the quitin usermod idea.

cheers!

1 Like

1.Hadronized seems to be hard at work on kts (Kak TreeSitter), that’s the one big plugin I’ve been willing to checkout for long but haven’t found the will and time too.

Yes! KTS has been stable for a while now and I’m still chasing bugs here and there. Most of the work occurring on it these days is to add more default configuration for language (I accept any PR adding new language) and themes.

I have several plans for the future (features) but most of it depends on external factors, so I’m currently taking the temperature in terms of how people use KTS for now / what they need. Things like indent guidelines, list of symbols, etc. will come at some point.

Are we still using plug.kak for plugins, if you aren’t rolling something together yourself?

I can’t speak for others, but I don’t use it. I git clone things I own and try to push to package things like KTS into package managers (i.e. pacman for Archlinux, etc.). I have a PKGBUILD I need to finish to make KTS available on the AUR. I think it’s a saner approach rather than making another package manager, but I don’t know plug.kak, so I can’t really speak about it.

Have fun and welcome back! :slight_smile:

1 Like

Yea I’ve been looking at KTS and I think I’ll have configuration I’ll be happy with.

I also saw you’ve done hop.kak as well.

I’ll need to test it out, but so far I have the following for installing and using hop.kak with plug.kak and a QWERTY keyboard layout.

plug "https://git.sr.ht/~hadronized/hop.kak" do %{
    cargo build --release --locked
    cargo install --locked --force --path .
    cargo clean
} config %{
    evaluate-commands %sh{ hop-kak --init }

    declare-option str hop_kak_keyset 'qwertyuiop[]asdfghjkl;zxcvbnm,.'

    map global normal <a-%> ':execute-keys gtGbx<ret>'

    define-command hop-kak %{
        eval -no-hooks -- %sh{ hop-kak --keyset "$kak_opt_hop_kak_keyset" --sels "$kak_selections_desc" }
    }

    define-command -override hop-kak-words %{
        exec 'gtGbxs\w+<ret>:eval -no-hooks -- %sh{ hop-kak --keyset "$kak_opt_hop_kak_keyset" --sels "$kak_selections_desc" }<ret>'
    }

    declare-user-mode hop

    map global user 'g' ': enter-user-mode hop<ret>' -docstring "hop.kak"

    map global hop 'h' ': hop-kak<ret>'       -docstring "Hop to thing"
    map global hop 'w' ': hop-kak-words<ret>' -docstring "Hope to word"
}

Hmm, @phaazon, hate to distract you from KTS, but I’m seeming to have some issues with hop.kak.

Error: 1:1: 'hop-kak-words': 2:7: 'evaluate-commands': 3:9: 'evaluate-commands': 3:637: '127.8+1|{hop_label_head}z': no such command

I’ve tried switching to kak-bundle for the heck of it, and here’s the following configuration I have for it.

 bundle hop.kak https://git.sr.ht/~hadronized/hop.kak %{
       declare-option str hop_kak_keyset 'qwertyuiop[]asdfghjkl;zxcvbnm,.'
 
       evaluate-commands %sh{ hop-kak --init }
 
       map global normal <a-%> ':execute-keys gtGbx<ret>'
 
       define-command hop-kak %{
           eval -no-hooks -- %sh{ hop-kak --keyset "$kak_opt_hop_kak_keyset" --sels "$kak_selections_desc" }
       }
 
       define-command hop-kak-words %{
          evaluate-commands -draft %{
              execute-keys 'gtGbxs\w+<ret>'
              evaluate-commands -no-hooks -client "%val{client}" -- %sh{ hop-kak --keyset "$kak_opt_hop_kak_keyset" --sels "$kak_selections_desc" }
          }
        }

      declare-user-mode hop

      map global user 'g' ': enter-user-mode hop<ret>' -docstring "hop.kak"

      map global hop 'h' ': hop-kak<ret>'       -docstring "Hop to thing"
      map global hop 'w' ': hop-kak-words<ret>' -docstring "Hop to word"
  }
  bundle-install-hook hop.kak %{
      cargo build --release --locked
      cargo install --locked --force --path .
      cargo clean
  }
  bundle-cleaner hop.kak %{
      cargo clean
      rm -rf ~/.cargo/bin/hop-kak
  }

Not sure if it’s related to the fact that I built hop.kak or something missing.


Anyway, still updating my configuration. There’s a few things I’m still tinkering with to get things a bit more satisfactory.

Which version of Kakoune are you using? It’s the first time I see that kind of error.

I’m not on the release version.

Output of kak -version:

Kakoune 2021.11.08-1169-g10ed78fe