Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dsherret
Copy link
Member

@dsherret dsherret commented Nov 23, 2021

Also changes it so the LSP sticks with module specifiers in the config file. I ran into an issue on CI with Mac where it was canonicalizing the file path of the config file and causing issues because now the config file was at a "different place" relative to potentially open files that aren't necessarily on the file system.

Closes #12865
Closes #12877

@dsherret dsherret requested a review from kitsonk November 23, 2021 17:27
cli/main.rs Outdated
specifier_to_file_path(&config_file.specifier)
.ok()
.map(|p| p.to_str().map(|s| s.to_string()))
.flatten()
Copy link
Member Author

@dsherret dsherret Nov 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like it would be better to just do config_file.specifier.to_string() here? I didn't want to introduce a breaking change on this key though. Thoughts?

Edit: If we ever introduced remote configs then we would need to change this to just use the specifier.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That change seems reasonable 👍

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Done in 1eaf50a

It is cleaner.

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dsherret dsherret force-pushed the fix_format_config_lsp branch from fbb16b5 to 1eaf50a Compare November 24, 2021 19:48
@dsherret dsherret merged commit adc5974 into denoland:main Nov 24, 2021
@dsherret dsherret deleted the fix_format_config_lsp branch November 24, 2021 20:14
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

Successfully merging this pull request may close these issues.

lsp: excluding a file from linting does not clear diagnostics Format config should respect include/excludes in LSP

2 participants