jdugan6240 / kak-bundle

Mirror to https://codeberg.org/jdugan6240/kak-bundle. Contributions are accepted here, but they are preferred upstream.
BSD Zero Clause License
30 stars 3 forks source link

Need help. bundle-install doesn't install anything #18

Open Rope-a-dope opened 4 days ago

Rope-a-dope commented 4 days ago

First, thank you so much for your contribution! I initially used plug.kak to install plugins, but ran into a problem where a wrong user name for github is remembered and I could't figure out how to clear that. Then found kak-bundle at the bottom page. Followed the instruction, but couldn't install any plugin. Is there anything wrong in my kakrc below?

Also, all kakoune plugins by Andrey Listopadov are archived now. Do you think it is a good idea to use them? image

~/.config/kak/kakrc

source "%val{config}/bundle/kak-bundle/rc/kak-bundle.kak"
bundle-noload kak-bundle https://codeberg.org/jdugan6240/kak-bundle

bundle-install {
    # LSP support
    https://github.com/kak-lsp/kak-lsp %{
        cargo install --locked --force --path .
    }

    # File finder/searcher
    https://github.com/andreyorst/fzf.kak

    # Snippets
    https://github.com/andreyorst/snippets.kak

    # Auto pairs
    https://github.com/alexherbo2/auto-pairs.kak

    # Git integration
    https://github.com/andreyorst/kaktree

    # Tree-sitter support
    https://git.sr.ht/~hadronized/kak-tree-sitter %{
        cargo install --locked --force --path .
    }

    # Tree-sitter themes
    https://git.sr.ht/~hadronized/kakoune-tree-sitter-themes

    # Swiper - incremental search
    https://git.sr.ht/~hadronized/swiper.kak

    # Hop - quick navigation
    https://git.sr.ht/~hadronized/hop.kak

    # Bookmarks
    https://git.sr.ht/~hadronized/bookmarks.kak

    # Notes
    https://git.sr.ht/~hadronized/notes.kak

}
# Basic settings
add-highlighter global/ number-lines
add-highlighter global/ show-matching

# LSP setup
eval %sh{kak-lsp --kakoune -s $kak_session}
hook global WinSetOption filetype=(rust|python|javascript|typescript) %{
    lsp-enable-window
}

# Configure Tree-sitter
hook global WinCreate .* %{
    tree-sitter-enable
}

# FZF setup
map global user f ':fzf-mode<ret>' -docstring "FZF mode"
map global user p ':fzf-file<ret>' -docstring "Find file"

# Enable auto-pairs
hook global WinCreate .* %{
    auto-pairs-enable
}

# Plugin keymaps
map global user l %{:enter-user-mode lsp<ret>} -docstring "LSP mode"
map global user s ':enter-user-mode swiper<ret>' -docstring 'Swiper mode'
map global user h ':enter-user-mode hop<ret>' -docstring 'Hop mode'
map global user b ':enter-user-mode bookmarks<ret>' -docstring 'Bookmarks mode'
map global user n ':enter-user-mode notes<ret>' -docstring 'Notes mode'

# LSP key bindings
map global lsp d ':lsp-definition<ret>' -docstring 'Jump to definition'
map global lsp r ':lsp-references<ret>' -docstring 'Show references'
map global lsp h ':lsp-hover<ret>' -docstring 'Show hover info'
jdugan6240 commented 4 days ago

Apologies in advance, but it may be a bit before I can properly get to this. I'm currently in the process of moving, so things are quite busy right now.

One thing that stood out immediately, though, is that that's not how you're supposed to declare plugins in your kakrc. Taking kak-lsp as an example, what you're supposed to do is the following:

bundle kak-lsp https://github.com/kak-lsp/kak-lsp %{
    # Any immediate configuration would go here
    hook global WinSetOption filetype=(rust|python|javascript|typescript) %{
        lsp-enable-window 
    }
}
# Since kak-lsp has a compilation step, we need to do this too
bundle-install-hook kak-lsp %{
    cargo install --locked --force --path .
}

Once you save this, reload and run bundle-install to install the plugin.

With this, you don't even need the eval %sh{kak-lsp --kakoune -s $kak_session} in your kakrc, as that just loads the .kak files from the plugin, something kak-bundle already does.

There seem to be a few more issues as well, but I'll need to address those when I have more time.

Rope-a-dope commented 4 days ago

Apologies in advance, but it may be a bit before I can properly get to this. I'm currently in the process of moving, so things are quite busy right now.

One thing that stood out immediately, though, is that that's not how you're supposed to declare plugins in your kakrc. Taking kak-lsp as an example, what you're supposed to do is the following:

bundle kak-lsp https://github.com/kak-lsp/kak-lsp %{
    # Any immediate configuration would go here
    hook global WinSetOption filetype=(rust|python|javascript|typescript) %{
        lsp-enable-window 
    }
}
# Since kak-lsp has a compilation step, we need to do this too
bundle-install-hook kak-lsp %{
    cargo install --locked --force --path .
}

Once you save this, reload and run bundle-install to install the plugin.

With this, you don't even need the eval %sh{kak-lsp --kakoune -s $kak_session} in your kakrc, as that just loads the .kak files from the plugin, something kak-bundle already does.

There seem to be a few more issues as well, but I'll need to address those when I have more time.

Thank you so much for your quick reply. Really appreciate your help! Hope your move goes well.