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

Windows line endings (^M) at the end of auto import statement #32

Open
icalvin102 opened this issue Jun 25, 2021 · 2 comments
Open

Windows line endings (^M) at the end of auto import statement #32

icalvin102 opened this issue Jun 25, 2021 · 2 comments

Comments

@icalvin102
Copy link

icalvin102 commented Jun 25, 2021

Whenever I use the auto import feature of coc or the CocAction('runCommand', 'editor.action.organizeImport') the line endings will be in windows format.

Example

import Foo from './Foo.svelte';^M

This only happens in svelte files. js and ts use Unix line endings.

Is there a way to specify the type of line endings?

My current workaround is to run :%s/^M//g from time to time.

Edit: I found a related issue on sveltejs/language-tools#854 but I don't know what to do with the information.

@quentin-fox
Copy link

I'm also encountering this issue. Is there anyone able who knows more about the LSP setup who would be able to tackle this issue? I'm happy to help debug this, but I have very little experience with the inner workings of LSPs.

@quentin-fox
Copy link

This has been fixed in recent versions of the svelte language server, from what I can tell.

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

2 participants