rmagatti / auto-session

A small automated session manager for Neovim
MIT License
1.13k stars 46 forks source link

[BUG] Not an editor command: SessionSave in SpaceVim #302

Closed rooday-doordash closed 1 month ago

rooday-doordash commented 1 month ago

Describe the bug Adding auto-session in SpaceVim init.toml doesn't seem to load the plugin.

To Reproduce Steps to reproduce the behavior:

  1. Add auto-session to SpaceVim init.toml.
  2. Restart SpaceVim
  3. Try using :SessionSave command

Expected behavior For the command to work/the plugin to have loaded.

Baseline (please complete the following information):

Here's my SpaceVim init.toml:

[options]
    # set spacevim theme. by default colorscheme layer is not loaded,
    # if you want to use more colorscheme, please load the colorscheme
    # layer
    colorscheme = "tokyonight-night"
    colorscheme_bg = "dark"
    # Disable guicolors in basic mode, many terminal do not support 24bit
    # true colors
    enable_guicolors = true
    # Disable statusline separator, if you want to use other value, please
    # install nerd fonts
    statusline_separator = "arrow"
    statusline_iseparator = "arrow"
    buffer_index_type = 4
    enable_tabline_filetype_icon = true
    enable_statusline_mode = false
    project_rooter_outermost = false
    bootstrap_before = 'myspacevim#before'
    bootstrap_after = 'myspacevim#after'

# Enable autocomplete layer
[[layers]]
name = 'autocomplete'
auto_completion_return_key_behavior = "complete"
auto_completion_tab_key_behavior = "smart"

[[layers]]
name = 'shell'
default_position = 'top'
default_height = 30

[[layers]]
  name = "colorscheme"

[[layers]]
  name = "lang#kotlin"

[[custom_plugins]]
  repo = "folke/tokyonight.nvim"
  merged = 0

[[layers]]
    name = 'git'
[[layers]]
    name = 'VersionControl'

[[layers]]
    name = "denite"
[[layers]]
    name = "telescope"

[[layers]]
  name = "gtags"
  gtagslabel = "pygments"

[[custom_plugins]]
    repo = "rmagatti/auto-session"
    merged = false

[[layers]]
  name = "lsp"
tan-wei commented 1 month ago

I would frankly say that it is not the bug with the plugin itself. It is related to the distribution SpaceVim.

rooday-doordash commented 1 month ago

@tan-wei I'm sure you're right, I'm just not sure where else to get info on this (pretty new to spacevim/vim plugins in general). I've noticed that spacevim is using this startify plugin which I think has it's own session handling logic, perhaps that is causing a conflict? Are there any known issues between startify and autosession?

rmagatti commented 1 month ago

Yeah this isn't really auto-session related. It just looks like the plugin never loaded if :SessionSave is not available. I'm gonna close this issue until an actual problem with auto-session itself comes up. I don't personally use SpaceVim so this isn't something I've come across or would have the time to dig into unfortunately.

Perhaps posting on the SpaceVim repo would shed some light?

tan-wei commented 1 month ago

@rooday-doordash If the plugin is loaded correctly, these commands should be enabled. For example, if you lazy load the plugin without set events or something else, it will cause the issue you descibed. Maybe you should ask Spacevim directly, to know how to load the plugin you add correctly.