Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite plugin for v0.3 #96

Open
68 of 89 tasks
chipsenkbeil opened this issue May 15, 2023 · 1 comment
Open
68 of 89 tasks

Rewrite plugin for v0.3 #96

chipsenkbeil opened this issue May 15, 2023 · 1 comment
Milestone

Comments

@chipsenkbeil
Copy link
Owner

chipsenkbeil commented May 15, 2023

This will serve as the main tracker for progress on v0.3. Currently, it's stored in a branch called OverhaulUi, but that branch has evolved into another massive rewrite of the plugin internals. They have shaped out to be much cleaner than in the past (thanks to using the lua language server). Once the work listed is complete, v0.3 will be the official branch and pointed to at the top level (instead of v0.2).

Engineering

General

  • Split functionality into distant-core and distant modules
  • Fix telescope integration (it's broken from refactoring)
  • Fix Dockerfile and associated tests

Distant

  • Create primary plugin entrypoint (more things at top-level of distant)
  • Revamp settings
    • Move server-specific settings to a field within the setup opts
    • Add cwd support to server settings
    • Move dir and file mappings out of server * and into a top-level mappings (we don't need server-specific keybindings for navigation, it should always be the same)
    • Allow user to specify edit/up/mkdir/etc nav action by key instead of a map so they don't need to import nav actions and editor to assign them (e.g. settings.mappings.dir.edit = '<Return>')
  • Create UI windows to visualize better
    • "Main Window" - hosts connections, system information, etc.
      • Connections tab
        • Show manager information
        • List active connections you can be from the manager
        • List available hosts from server settings
        • Be able to switch active connections
        • Be able to launch from available hosts
        • Be able to connect from available hosts
        • Be able to jump to next or previous server connection using <C-n> and <C-p>
      • System information tab
        • Show system information
        • Update information whenever a connection is made/switched
      • Log tab (???)
        • Show log output (last X lines?)
      • Debug tab (???)
        • Show detailed manager information (pid, uptime, capabilities, pre-existing info?)
        • Show detailed client information (uptime, capabilities, process list including shells, api, lsp, etc)
      • Help tab
        • Show keybindings similar to lazy.nvim style as I like it more than mason.nvim
        • Make keybindings changeable in settings reflect within help tab
    • "Metadata Window" - displays metadata for a file/directory/symlink
    • "Toast" - port of nvim-notify
  • Replace errors with vim.notify with vim.log.levels.ERROR to be friendlier
  • Support enabling/disabling "toast" for vim.notify in case user has another plugin (like nvim-notify) that they want to use
  • Move search state from plugin to editor since there is only one search at a time (maybe?)
  • Support file watching
    • Detect changes to files outside of neovim (similar to FileChangedShell, or triggering it if possible)
    • Understand if buffer has changed and prompt for reloading if so, otherwise reload
    • Use metadata to check for things like mtime change, file len change, etc. (cache those locally)
  • Support batch requests

Distant Core

  • Create a user interface library within distant-core ported from mason.nvim
  • Rewrite job api from utils into its own module
  • Rewrite authentication handling into its own module
  • Rewrite API abstraction to be cleaner and work better with language server
  • Add an event emitter (also from mason.nvim) so we can better capture when actions take place
  • Migrate installation logic into its own module
  • Create abstraction for version parsing and data
  • Create abstraction for destination/URI parsing and data
  • Create abstraction for client
  • Create abstraction for manager
  • Create abstraction for server
  • Rewrite CLI builder into standalone module with cleaner design and support for language server
  • Clean up utils module by removing unused functions, inlining single-use

Tests

  • Update driver to use new plugin API
  • Fix existing e2e tests
  • Fix existing unit tests
  • Write async versions of e2e API tests

Bugs

Documentation

  • Set up vimdoc generation from markdown via panvimdoc
  • Write updated plugin documentation in markdown to host on distant.rocks
    • Provide overview of plugin (what is it? what does it do?)
    • Quickstart (basic setup, usage) - the existing quickstart can be repurposed
    • Installation guide (vimdoc is outdated, still referencing the library file instead of CLI)
    • Explain health coverage via :checkhealth distant
    • Documentation of settings (needs to be completely rewritten)
    • Documentation of navigation - the existing doc can be reused (need to add metadata and check that up-to-date)
    • Documentation of vim commands like :Distant and :DistantInstall - the existing doc can be reused with tweaks
    • Documentation of extensions - telescope can be reused
    • Documentation of Lua API (e.g. require('distant')) - needs to be completely rewritten
      • Event subscriptions and kinds of events
      • API field and methods
      • Buf field and methods
      • Settings field and methods
      • Launch method
      • Connect method
      • Connections method
      • Server settings
      • Wrap method
      • Utility methods (get/set active client, retrieve manager, retrieve client, cli/cli path)
    • FAQ - can be reused
    • Changelog - can be reused, but need to add v0.3 information
    • Credits - can be reused
    • License - can be reused
  • Record video overview of plugin
    • Explain what it does and why
    • Show UI to connect to a server
    • Pull up the diagram to explain how it works
    • Highlight shell usage
    • Highlight LSP server usage
    • Highlight multiple connections usage
@chipsenkbeil chipsenkbeil added this to the v0.3.0 milestone May 15, 2023
@chipsenkbeil chipsenkbeil pinned this issue May 15, 2023
Repository owner locked and limited conversation to collaborators May 15, 2023
@chipsenkbeil
Copy link
Owner Author

Realized I didn't explain the servers configuration setting in distant.dev, which is a very important one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant