Skip to content

Latest commit

 

History

History
81 lines (57 loc) · 3.94 KB

CONTRIBUTING.md

File metadata and controls

81 lines (57 loc) · 3.94 KB

Contributing

The fish-lsp aims to create an experience that aligns with the fish language goals.

In short, the project hopes to create a development environment that is as friendly as possible.


There are many ways to contribute to the project:

  • Submit bugs, and help work on fixes
  • Refactor out unnecessary source code.
  • Implement features, outlined in the roadmap.
  • Implement new client configurations, outlined in this repo
  • Add tests to verify expected behavior.
  • Update documentation, across any of the project's repositories

Getting started

Working on the project, will require you to build it from source.

You will then be required to link the project to your global environment.

Once these steps are complete, you can then begin testing locally. Forking the project is encouraged.

Upon completing a change, submit a PR.

Recommended workflow & Helpful Insight

Since stdin/stdout are reserved for the protocol to communicate, a generally successful method to achieve quick results, is through TDD (Test Driven Development). Many tree-sitter helper functions have already been written, to aid in providing useful functionality further down the release cycle.

Currying is a useful design pattern, that makes iterating through the Abstract Syntax Trees (ASTs) significantly less error prone. Earlier language server protocol versions required the Nodes in our tree items, to be stored as a flat list. Due to this reason, there has been the need for a significant rewrite of previously working features (diagnostics, etc...). This would be a great place to start, as many of server providers are implemented using range based location calculation's to abide to their prior protocol use.

Features that receive bumps in support will eventually be supported as an opt in design through the application config (also needs a rewrite). This will allow experimental feautures to the user's who understand what they are testing. I have included zod, as a dependency for reading in process.env variables to the user's configuration.

Until this is completed, I am sorry for any unintended bugs.

Important Tooling Provided

  • tree-sitter - used for data structures/algorithms, prevelant to the shell language.
  • eslint - used for linting and formatting
  • knip - used for tree-shaking and checking unused dependcies
  • commander.js - used for src/cli.ts and other tooling to start the server

Becoming framiliar with using the tree-sitter code, is signficantly easier while using the previously mentioned TDD. Although, another helpful method is avaliable for any neovim devlepers via the :InspectEdit command. This will allow you to visualize the AST that tree-sitter parsed from fish input.

Adding support to new Langauge Clients/Editors

Generally, all that is required is using the fish-lsp start command, and specifying fish for attaching the server to a filetype. Any other fluff in this settings, as seen in the JSON example, is only for ease of use.

Adding new client configurations, to the fish-lsp-client's repo, is greatly appreciated!

Contributors