FrigoEU / psc-ide-vim

Vim plugin for psc-ide
96 stars 36 forks source link

Papply/PSCIDEapplySuggestion misses a newline when inserting missing top-level type declaration #123

Closed andreasthoelke closed 6 years ago

andreasthoelke commented 6 years ago

Papply/PSCIDEapplySuggestion does not work as expected for me:

-- Running :Papply on this line
test = "ab"

-- produces this output:
test :: Stingtest = "ab"

-- while this would be expected:
test :: Sting
test = "ab"

If I comment out this line https://github.com/FrigoEU/psc-ide-vim/blob/23bf302de91181d409fb988ce372ab703b119bc5/ftplugin/purescript_pscide.vim#L778 in PSCIDEapplySuggestionPrime

I get

test :: Sting
 test = "ab"

(Note the false indentation of the second line)

The replacement insertion in PSCIDEapplySuggestionPrime is a bit involved, so not sure how to fix this.

coot commented 6 years ago

Could you please try if the fix works for you, especially if does not break other suggestions.