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

refactor & removal of legacy analyzer #52

Draft
wants to merge 30 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
0c8d744
feat: test-data/mock-syntax-node.ts mocked `SyntaxNode`
ndonfris Jul 30, 2024
f9dc653
feat: minimal `getFishDocumentSymbol(uri, root)` supported symbols.ts
ndonfris Jul 30, 2024
63eeb7b
feat: minimal `getFishDocumentSymbol(uri, root)` supported symbols.ts
ndonfris Jul 30, 2024
1965446
fix: rm logger from `ConfigHandlerSchema` in `src/cli.ts`
ndonfris Jul 31, 2024
57c6bd4
feat: added `flattenSymbols()` w/ tests
ndonfris Jul 31, 2024
362198b
test: using dotenv to handle autoloaded symbols
ndonfris Aug 1, 2024
c10fba6
fix: removal of lint failures in process-env.ts
ndonfris Aug 1, 2024
40aa292
chore: removed unused dependencies & unused files
ndonfris Aug 1, 2024
d6f9f42
chore: test coverage of `test-data/symbols.test.ts` and removed unuse…
ndonfris Aug 1, 2024
e59fd08
refactor: updated scripts/build-completions.fish
ndonfris Aug 7, 2024
0350c7b
build(server.ts,analyzer.ts): BREAKING removal of src/{workspace,docu…
ndonfris Aug 7, 2024
4c3726a
fix: test-data/symbols.test.ts
ndonfris Aug 7, 2024
bde7393
chore: removal of `src/{workspace,document}-symbol.ts` for removal `s…
ndonfris Aug 7, 2024
d9ac8a9
feat: moved important tree-sitter analyzer.ts functions to src/utils/…
ndonfris Aug 8, 2024
fd99ecd
docs: added to `docs/CHANGELOG.md` for missing v1.0.7, v1.0.8 & v1.0.8-1
ndonfris Aug 8, 2024
e90058e
feat: added range related operations from workspace-symbols to src/ut…
ndonfris Aug 8, 2024
c3d5fc0
feat: added test for source filename
ndonfris Aug 8, 2024
e9936ab
chore: added docs/graphs/**/* to .gitignore
ndonfris Aug 9, 2024
f56e5d9
chore: added `WorkspaceSymbols` to symbols.test.ts
ndonfris Aug 14, 2024
13f1efb
chore: clean symbols.test.ts + added new filters
ndonfris Aug 15, 2024
9a75579
feat: breaking future-analyze.ts
ndonfris Aug 15, 2024
1d7108d
chore: created `LspDocument[]` in `test-data/**.test.ts` to `test-dat…
ndonfris Aug 21, 2024
d988066
feat: added analyzer local/global definitions methods
ndonfris Aug 21, 2024
e14b52c
fix: cleaned-up future-analyze.ts
ndonfris Aug 21, 2024
2497c30
feat: `filterLastSymbolPerScope` + using class for `FishDocumentSymbol`
ndonfris Aug 23, 2024
ecd0a17
feat: added `filterSymbolsOutsideOfCursor()` to symbol.ts
ndonfris Aug 23, 2024
9c8d9ce
fix: testing 'filter last unique symbols' for `./test-data/symbols.ts`
ndonfris Aug 29, 2024
81efce5
chore: testing references
ndonfris Aug 31, 2024
f7d5e91
chore: breaking change future-analyze.ts and `test-data/symbols.test.ts`
ndonfris Aug 31, 2024
a5a9841
chore: fix `test-data/symbols.test.ts` to test `src/future-analyzer.t…
ndonfris Aug 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module.exports = {
project: './tsconfig.eslint.json',
tsconfigRootDir: __dirname,
},
ignorePatterns: ['docs/**/*.ts'],
rules: {
'array-bracket-spacing': 'error',
'brace-style': 'error',
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ wikis
test-data/staging
!snippets/*.json
snippets/*
docs/import-diagram/*
docs/graphs/*
1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

19 changes: 18 additions & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,23 @@ Documenting notable changes across project revisions

## Current

## \[1.0.8\] - 2024-07-24 (PR [#49](https://github.com/ndonfris/fish-lsp/pull/49) & [#47](https://github.com/ndonfris/fish-lsp/pull/47))

- __logging__ to a file is now an __opt-in__ feature.
- [src/logger.ts](https://github.com/ndonfris/fish-lsp/blob/5e06a271f522cb88f78b5c398fcca4057cbcc9c6/src/logger.ts#L45) does not _forward to a file_ unless one has been given via `$fish_lsp_logsfile`
- __added__ [#49](https://github.com/ndonfris/fish-lsp/pull/49) 'feat: logging behaviour opt-in set by '$fish_lsp_logsfile' - #49'
- __removed__ `logging` keys from `$fish_lsp_enabled_handlers` and `$fish_lsp_disabled_handlers` env variables
- __added__ [#46](https://github.com/ndonfris/fish-lsp/pull/46), 'feat: add
ability to override `wasm_file`' for [nixpkg](https://github.com/NixOS/nixpkgs/pull/320463)

> __CHANGES ALSO SEEN ON:__ \[1.0.8-1\](https://github.com/ndonfris/fish-lsp/blob/v1.0.8-1/)

## \[1.0.7\] - 2024-06-28 ([PR](https://github.com/ndonfris/fish-lsp/commit/7bba6bc5064a5f07a3e11e7ca1d20366ea74a13a))

- updated `fish_lsp_enabled_handlers` & `fish_lsp_disabled_handlers`
documentation on [README.md](https://github.com/ndonfris/fish-lsp/blob/7bba6bc5064a5f07a3e11e7ca1d20366ea74a13a/README.md?plain=1#L163)
- minor changes to __improve__ [nixpkg](https://github.com/NixOS/nixpkgs/pull/330320) support, mostly documentation related

## \[1.0.6\] - 2024-06-12 ([PR #38](https://github.com/ndonfris/fish-lsp/pull/38))

- added server `sendDiagnostic` support
Expand Down Expand Up @@ -70,4 +87,4 @@ Documenting notable changes across project revisions

## \[1.0.0\] - Initial Release

- Main project files
- Main project files
19 changes: 19 additions & 0 deletions fish_files/get-fish-autoloaded-paths.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env fish

echo -e "__fish_bin_dir\t$__fish_bin_dir"

echo -e "__fish_config_dir\t$__fish_config_dir"
echo -e "__fish_data_dir\t$__fish_data_dir"
echo -e "__fish_help_dir\t$__fish_help_dir"

echo -e "__fish_sysconf_dir\t$__fish_sysconf_dir"
echo -e "__fish_user_data_dir\t$__fish_user_data_dir"
echo -e "__fish_added_user_paths\t$__fish_added_user_paths"

echo -e "__fish_vendor_completionsdirs\t$__fish_vendor_completionsdirs"
echo -e "__fish_vendor_confdirs\t$__fish_vendor_confdirs"
echo -e "__fish_vendor_functionsdirs\t$__fish_vendor_functionsdirs"

echo -e "fish_function_path\t$fish_function_path"
echo -e "fish_complete_path\t$fish_complete_path"
echo -e "fish_user_paths\t$fish_user_paths"
3 changes: 2 additions & 1 deletion fish_files/get-type.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env fish

function get_type --argument-names str

set -l type_result (type -t "$str" 2> /dev/null)
switch "$type_result"
case "function"
Expand Down Expand Up @@ -32,4 +33,4 @@ else if test -n "$fallback_output"
echo "$fallback_output"
else
echo ''
end
end
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"scripts": {
"prepare": "husky",
"setup": "run-s sh:build-time sh:build-wasm",
"preinstall": "yarn install --ignore-scripts --no-progress",
"postinstall": "run-s setup compile sh:relink sh:build-completions",
"compile": "tsc -b",
"watch": "tsc -b -w",
Expand Down Expand Up @@ -92,7 +91,7 @@
"devDependencies": {
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@tsconfig/node-lts": "^20.1.3",
"@tsconfig/node21": "^21.0.3",
"@types/chai": "^4.3.14",
"@types/jest": "^29.5.12",
"@types/node": "^20.11.30",
Expand All @@ -115,7 +114,8 @@
"rimraf": "^5.0.5",
"tree-sitter-cli": "^0.22.2",
"tree-sitter-fish": "https://github.com/ram02z/tree-sitter-fish",
"ts-jest": "^29.1.2",
"ts-jest": "^29.2.3",
"ts-jest-mocker": "^1.0.0",
"ts-node": "^10.9.2"
}
}
}
9 changes: 5 additions & 4 deletions scripts/build-completions.fish
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/env fish

if not test -d $HOME/.config/fish/completions
mkdir -p $HOME/.config/fish/completions
# https://github.com/alacritty/alacritty/blob/master/INSTALL.md#fish
set -l complete_dir "$fish_complete_path[1]"
if not test -d "$complete_dir"
mkdir -p $complete_dir
end

fish-lsp complete > $HOME/.config/fish/completions/fish-lsp.fish
fish-lsp complete > $complete_dir/fish-lsp.fish
7 changes: 3 additions & 4 deletions scripts/relink-locally.fish
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,11 @@ else
if command -vq fish-lsp
echo ' "fish-lsp" is already installed'
echo ' UNLINKING and LINKING again'
yarn unlink --global fish-lsp &>/dev/null
yarn unlink --global-folder fish-lsp &>/dev/null
yarn global remove fish-lsp &>/dev/null
end
yarn link --global fish-lsp --force &>/dev/null

yarn link --global-folder fish-lsp --force &>/dev/null
echo -e 'SUCCESS! "fish-lsp" is now installed and linked'
return 0
return $status

end
Loading
Loading