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

completion includes file extensions in import statements #1

Open
pontus-albert opened this issue Sep 1, 2021 · 6 comments
Open

completion includes file extensions in import statements #1

pontus-albert opened this issue Sep 1, 2021 · 6 comments

Comments

@pontus-albert
Copy link

pontus-albert commented Sep 1, 2021

Is it possible to exclude file extensions from the suggestions in the case of import statements in TypeScript?

@hrsh7th
Copy link
Owner

hrsh7th commented Sep 2, 2021

I can implement it but we need consider it.

For example, we need to remove only .ts but .css should keep.

@pontus-albert
Copy link
Author

pontus-albert commented Sep 4, 2021

I am able to get file paths completed without the file extensions in compe. Initially I thought this was because of another source for dirs, but obviously that was when importing from a dir with an index file. What was really happening was that I got a result for the file from the lsp.

I don't believe I got those results (file kind) from the lsp using the cmp plugin. Is there a difference with what results are shown from the lsp with compe vs cmp?

This is no longer an issue with cmp-path, so you may close it.

@Tauka
Copy link

Tauka commented Sep 15, 2021

@pontus-albert Were you able to resolve this issue with extensions? I am having same problem

@pontus-albert
Copy link
Author

@pontus-albert Were you able to resolve this issue with extensions? I am having same problem

I went back to compe. But I find my self wanting to create a custom source, so I will probably install cmp again, and tackle this issue again. Maybe the solution would be a separate source that does not include the file extension, so that you can choose what to complete, just like you could with compe.

@hrsh7th
Copy link
Owner

hrsh7th commented Oct 26, 2021

I'm getting the file path completion from typescript-language-server.
So I still can't understand the problem.

@pontus-albert
Copy link
Author

pontus-albert commented Nov 1, 2021

Installed cmp again yesterday and it worked just like in compe. Don't know what went wrong the first time. The plugin is much improved in general since then too. Great work! Love how extendable it is.

fcying pushed a commit to fcying/cmp-async-path that referenced this issue Oct 22, 2024
…te list' (hrsh7th#1) from folliehiyuki/cmp-async-path:fix-include-hidden into main

Reviewed-on: https://codeberg.org/FelipeLema/cmp-async-path/pulls/1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants