ionide / Ionide-vim

F# Vim plugin based on FsAutoComplete and LSP protocol
MIT License
163 stars 20 forks source link

closing brace wrongly indented #76

Open rbauduin opened 8 months ago

rbauduin commented 8 months ago

Describe the bug The closing brace of a newly entered braces pair is idented wrongly after it is put on its own line.

To Reproduce Press enter between braces so that the closing brace is placed alone on a line.

Expected behaviour Closing brace is put at same indentation as opening brace

Screenshots

https://github.com/ionide/Ionide-vim/assets/9960888/f5ee6aa3-dcf3-472b-8c65-053dd5586a28

Environment (please complete the following information):

cannorin commented 7 months ago

I think the whole syntax and indent files need to be revisited. They are from the ancient era, so they have some performance problems which can be solved today, and they also don't support the newest syntax of today's F#.

I think now is the best time to do this, since F# 8 has just been released with a lot of syntax changes.

cannorin commented 7 months ago

I'm wondering if we can somehow import the syntax and indent configurations from Ionide-VSCode, so that we can avoid maintaining two versions of those files.

JulesNP commented 7 months ago

Since vim's indent program is in vimscript, using the VSCode version would be difficult to import, I believe.

I think Ionide should switch to the indent file from here: https://github.com/PhilT/vim-fsharp

I'm finding it very consistent and fast compared to Ionide's, after using it myself over the past few months.