Skip to content

haskell-yas causes issues when loading other modes #364

Closed
@diogo149

Description

@diogo149

When opening a file that loads a mode which requires yasnippet, yasnippet just breaks because an invalid path is added to yas-snippet-dirs (eg. if the file name is /some/path/foo.clj, /some/path/snippets is added), and this is caused by haskell-yas. When loading yasnippet, haskell-yas is loaded as well, and (buffer-file-name) is called with the current file, thus leading to the wrong relative path being loaded. This only occurs when yasnippet is loaded lazily.

My understanding is that switching the order of (buffer-file-name) and load-file-name in haskell-snippets-dir should fix the issue. I could submit a pull request if that's the right thing to do and you wouldn't rather do it yourself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions