-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Pull master to v1.0.0 (#67) * Fix bug when no new_tokens exist (#61) * Fix bug when no new_tokens exist if no new_tokens existed it would not give out any new tokens since the overwrite method did not have anything to compare against. * Format * Bump version * Add Docs (#66) * Create .readthedocs.yaml * Exclude docs branch from normal actions * Try making some changes * Continue work on docs * Continue work on docs * Fix builds * Add mkdocs and format * Pip install? * Try using sphinx * Fix command * Finish the docs * Update README to outsource docs * Re-bump version * Revert docs actions changes and change job names * Revert "Re-bump version" This reverts commit 3a84012. * Revert "Revert docs actions changes and change job names" This reverts commit 1b141c3. * Bump version (again) * Revert docs actions changes and change job names * Tree sitter (#62) * Create POC * Improve POC * Bug fixes, comments, use assert * Have helpful auto-mapper The auto-mapper is great for users who don't want to spend forever mapping stuff so it will give a mapping made from what context it can get and then the user can refine it and hone it * Format * Move functions to separate file and write tests Make the tests more official and move the functions to its own file to decouple the tests * Add comments, rename function and arguments * Move tests to test folder, funcs to highlight folder * Update dependencies * Add requirements-dev.txt and add pycharm to gitignore * Improve spelling and imports * I figured it out :D * Create tree_sitter_highlight() * Make special tokens function * Split up tests * Format * Try working on adding to API * Format * Show crash in actions and ruff * Even more formatting * Fix the c pointer bug * Get working server output * Reformat * Add examples and update README * Format * isort again * Add support for .so files * Add .so tests * Fix mapping test comments * Update docs to match tree sitter highlighting * Bump version in docs * Try adding epub * Keep only the epub file * Specify builders * Try one-lining this * Print dir * Try another way * Revert "Merge branch 'master' into v1.0.0" This reverts commit 3bd2e83, reversing changes made to e85a8eb. * Change from Salve IPC to Salve * Appease formatters I accidentally removed a newline when pulling master to the v1.0.0 branch * Update highlight example to not be ridiculous * Use dirhtml for docs * Logging (#70) * Create POC * Add most of the logging and fix setup.py I still need to give logging to the Tree Sitter part * Add logs to Tree Sitter highlight and format * Fix tests * Use salve dependency hub (#71) * Use salve dependency hub * Update docs * Spell checks and start work on improving docs * Further improvements to docs * Add examples and improve small things * Remove tabs * Update salve_dependency_hub * Update docs and examples * Token bugfix and add test Sometimes it would try overwriting tokens it shouldn't and DOTALL got all the comment regexes to work properly * Format * Use .extend instead of += (#72) * Update links * Remove tree sitter (#75) * Start removing Tree Sitter Code Commit 1 in a series removing Tree Sitter Support from Salve in favor of Albero. * Run basic formatting Commit 2 in a series removing Tree Sitter Support from Salve in favor of Albero. * Update tests Commit 3 in a series removing Tree Sitter Support from Salve in favor of Albero. * Remove Tree Sitter mentions from docs Commit 4 in a series removing Tree Sitter Support from Salve in favor of Albero. * Update gitignore * Update docs * Use token_tools * Links and chars standalone (#77) * Move links and hidden chars file * Make links and hidden chars standalone * Fix bug and tests * Windows being annoying * Update docs * Format
- Loading branch information
Showing
50 changed files
with
492 additions
and
444 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,9 @@ | |
__pycache__/ | ||
dist/ | ||
build/ | ||
.pytest_cache/ | ||
.ruff_cache/ | ||
salve.egg-info/ | ||
|
||
# Pycharm | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
========================= | ||
Highlight Logging Example | ||
========================= | ||
|
||
.. code-block:: python | ||
from logging import INFO, Logger, basicConfig, getLogger | ||
from time import sleep | ||
from salve import HIGHLIGHT, IPC, Response | ||
basicConfig( | ||
level=INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s" | ||
) | ||
logger: Logger = getLogger("Main") | ||
def main(): | ||
context = IPC() | ||
context.update_file( | ||
"test", | ||
open(__file__, "r+").read(), | ||
) | ||
context.request( | ||
HIGHLIGHT, file="test", language="python", text_range=(1, 30) | ||
) | ||
sleep(1) | ||
output: Response | None = context.get_response(HIGHLIGHT) | ||
if output is None: | ||
logger.info("Output is None") | ||
logger.info(f"Output: {output}") | ||
context.kill_IPC() | ||
if __name__ == "__main__": | ||
main() | ||
See the file example file `here <https://github.com/salve-org/salve/blob/master/examples/highlight_logging_example.py>`_. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.