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

Comment lines affect indentation #67

Closed
usualwitch opened this issue Jun 2, 2023 · 1 comment
Closed

Comment lines affect indentation #67

usualwitch opened this issue Jun 2, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@usualwitch
Copy link

Describe the bug
If a comment line ends with one of the patterns defined in https://github.com/ionide/Ionide-vim/blob/master/indent/fsharp.vim#L189, the next line will be indented.

To Reproduce
Write a comment that ends with any word from this list begin\|do\|else\|fun\|function\|functor\|if\|initializer\|object\|private\|sig\|struct\|then\|try then press enter. The next line will be shifted right.

Expected behaviour
Comment lines should not change indentation.

@usualwitch usualwitch added the bug Something isn't working label Jun 2, 2023
cannorin added a commit that referenced this issue Jul 4, 2023
Fix #67: don't change indentation after comment lines
@cannorin
Copy link
Member

cannorin commented Jul 4, 2023

@usualwitch Note that #71 is not perfect: it will still increase indentation within ranged comments (* ... *) since there is apparently no efficient way for Vim's indent file to know if the current position is within ranged comment.

It will fix the following case, though:

// begin
// something

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants