Closed nelson6e65 closed 3 years ago
Maybe related, I'd check the dev-console and get this error in lib/CodeLensManager.js#L82
:
Uncaught (in promise) RangeError: Invalid count value
Maybe related, I'd check the dev-console and get this error in
lib/CodeLensManager.js#L82
:Uncaught (in promise) RangeError: Invalid count value
This seems been caused by negative values (range.start.column - charactersTaken
in line 76
). I added Math.abs(paddingSpacesNeeded)
and this error disappears (I don't know if this is the intended logic) but the auto complete error still persists. :pensive:
I believe this is the same problem as #487 - or rather, is fixed by the same fix.
I had the same problem before releasing 5.0.0 and it disappeared after updating the atom-languageclient to the unstable release.
Could you try and confirm if that indeed fixes it? It's what this commit reverts. In other words: change the package.json
atom-languageclient
dependency to the unstable commit, run apm install
in the package folder (removing node_modules
and package-lock.json could be necessary) and restart Atom.
@Gert-dev Yes. I'll check. brb
Yes, @Gert-dev In effect, that solved this issue.
Going with "atom-languageclient": "^0.9.8"
solve that issue too.
Changed it to:
"atom-languageclient": "github:atom/atom-languageclient#3d92c060e0a1b9558a392f5fba674dc707b4528e"
in package.json
and removed both package-lock.json
and node_modules
. Then after running apm install
in that same directory everything worked again.
@jeremyFreeAgent that works too except you have to change ^0.9.8
to 0.9.8
(without caret).
Hi, the fix given by @Gert-dev works for me too ! But what happend on the next update ?
cd ~/.atom/packages/php-ide-serenata/
vi package.json
change "atom-languageclient" > github:atom/atom-languageclient#3d92c060e0a1b9558a392f5fba674dc707b4528e
rm -r node_modules/ package-lock.json
apm install
Hi, the fix given by @Gert-dev works for me too ! But what happend on the next update ?
cd ~/.atom/packages/php-ide-serenata/ vi package.json change "atom-languageclient" > github:atom/atom-languageclient#3d92c060e0a1b9558a392f5fba674dc707b4528e rm -r node_modules/ package-lock.json apm install
Yo will need o do this again
I didn't manage to get autocomplete working properly by setting language server version to 0.9.8 on W10. It was still adding text instead of replacing. So i added a small bug into code to overcome it in .atom/packages/php-ide-serenata/SerenataClient:OnDidInsertSuggestion
const additionalTextEdits = suggestion.completionItem.additionalTextEdits;
const editText = suggestion.completionItem.textEdit;
if (!additionalTextEdits || additionalTextEdits.length === 0) {
return editor.setTextInBufferRange(
[
[editText.range.start.line, editText.range.start.character],
[editText.range.end.line, editText.range.end.character]
],
''
);
}}
When I click/tab/enter the auto complete result (after ctrl + space), the written text is kept, which creates a duplicated text.
Reproduction
Enviroment
Packages list
```$ apm list Built-in Atom Packages (93) ├── atom-dark-syntax@0.29.1 ├── atom-dark-ui@0.53.3 ├── atom-light-syntax@0.29.1 ├── atom-light-ui@0.46.3 ├── base16-tomorrow-dark-theme@1.6.0 ├── base16-tomorrow-light-theme@1.6.0 ├── one-dark-ui@1.12.5 ├── one-light-ui@1.12.5 ├── one-dark-syntax@1.8.4 ├── one-light-syntax@1.8.4 ├── solarized-dark-syntax@1.3.0 ├── solarized-light-syntax@1.3.0 ├── about@1.9.1 ├── archive-view@0.65.1 ├── autocomplete-atom-api@0.10.7 ├── autocomplete-css@0.17.5 ├── autocomplete-html@0.8.8 ├── autocomplete-plus@2.42.3 ├── autocomplete-snippets@1.12.1 ├── autoflow@0.29.4 ├── autosave@0.24.6 ├── background-tips@0.28.0 ├── bookmarks@0.46.0 ├── bracket-matcher@0.91.1 ├── command-palette@0.43.5 ├── dalek@0.2.2 ├── deprecation-cop@0.56.9 ├── dev-live-reload@0.48.1 ├── encoding-selector@0.23.9 ├── exception-reporting@0.43.1 ├── find-and-replace@0.219.0 ├── fuzzy-finder@1.14.0 ├── github@0.30.0 ├── git-diff@1.3.9 ├── go-to-line@0.33.0 ├── grammar-selector@0.50.1 ├── image-view@0.64.0 ├── incompatible-packages@0.27.3 ├── keybinding-resolver@0.39.0 ├── line-ending-selector@0.7.7 ├── link@0.31.6 ├── markdown-preview@0.160.2 ├── metrics@1.8.1 ├── notifications@0.70.6 ├── open-on-github@1.3.1 ├── package-generator@1.3.0 ├── settings-view@0.261.3 ├── snippets@1.5.0 ├── spell-check@0.75.0 (disabled) ├── status-bar@1.8.17 ├── styleguide@0.49.12 ├── symbols-view@0.118.2 ├── tabs@0.110.0 ├── timecop@0.36.2 ├── tree-view@0.228.0 ├── update-package-dependencies@0.13.1 ├── welcome@0.36.9 ├── whitespace@0.37.7 ├── wrap-guide@0.41.0 ├── language-c@0.60.18 ├── language-clojure@0.22.8 ├── language-coffee-script@0.50.0 ├── language-csharp@1.1.0 ├── language-css@0.44.0 ├── language-gfm@0.90.6 ├── language-git@0.19.1 ├── language-go@0.47.1 ├── language-html@0.52.3 ├── language-hyperlink@0.17.1 ├── language-java@0.31.3 ├── language-javascript@0.132.0 ├── language-json@1.0.4 ├── language-less@0.34.3 ├── language-make@0.23.0 ├── language-mustache@0.14.5 ├── language-objective-c@0.16.0 ├── language-perl@0.38.1 ├── language-php@0.44.2 ├── language-property-list@0.9.1 ├── language-python@0.53.3 ├── language-ruby@0.72.17 ├── language-ruby-on-rails@0.25.3 ├── language-rust-bundled@0.1.0 ├── language-sass@0.62.0 ├── language-shellscript@0.27.12 ├── language-source@0.9.0 ├── language-sql@0.25.10 ├── language-text@0.7.4 ├── language-todo@0.29.4 ├── language-toml@0.20.0 ├── language-typescript@0.5.2 ├── language-xml@0.35.3 └── language-yaml@0.32.0 Community Packages (31) /home/nelson6e65/.atom/packages ├── angular-snippets@7.0.5 (disabled) ├── atom-beautify@0.33.4 ├── atom-ide-ui@0.13.0 ├── atom-typescript@13.3.0 ├── auto-detect-indentation@1.3.0 ├── docblockr@0.13.7 ├── imdone-atom@2.4.33 ├── imdone-atom-github@0.1.11 (disabled) ├── intentions@1.1.5 ├── json-sort@1.6.0 ├── language-blade@0.43.1 ├── language-vue-component@0.5.0 ├── less-than-slash@0.19.0 ├── linter@2.3.1 (disabled) ├── linter-eslint@8.5.5 ├── linter-json-lint@0.1.3 ├── linter-php@1.6.1 ├── linter-phpcs@1.7.6 ├── linter-python-pep8@0.2.0 ├── linter-shellcheck@1.6.0 ├── linter-tslint@1.10.31 ├── linter-xmllint@1.4.4 ├── minimap@4.29.9 ├── minimap-git-diff@4.3.1 ├── minimap-linter@2.2.1 ├── php-ide-serenata@5.0.2 ├── project-manager@3.3.8 ├── sort-lines@0.19.0 ├── sync-settings@0.8.6 ├── todo-show@2.3.2 └── wakatime@7.1.1 ```