Search code examples
visual-studio-codehaskellrulers

In VS Code rulers are not drawn for Haskell files


I have added vertical rulers to VS Code in the settings.json file like this:

    "editor.rulers": [
        40,80],

This works, e.g. for Python files but strangely not for Haskell files. (I am using the usual Python and Haskell extensions.)

Here a screenshot of VS Code with Haskell files:

Haskell code has no rulers

Any idea how I can make the rulers visible for Haskell as well?


Solution

  • I could not find any rulers setting in any of the normal settings files. However, in my current project.code-workspace file I had the lines:

            "settings": {
                    "editor.rulers": []
            }
    

    which overwrote the ruler preferences in the settings files!

    When I took these lines out of the workspace file everything went back to normal and the ruler appeared as expected

    Note: Because the settings were stored in the workspace file, other projects (like my python projects with other or no workspace file) were not affected. -- So it appeared to me that the issue is Haskell-related, but infact it was only related to my Haskell workspace file.