Skip to content

Syntastic integration #17

@joakim-brannstrom

Description

@joakim-brannstrom

The Vim plugin syntastic have support for D by checking the compile errors from DMD.

A problem though for syntastic/D is that the import paths for DMD are often wrong. So the error messages are often times complaining about the first module import that isn't part of std.

A solution for this would be to reuse the information that Dutyl have gathered from D tools and supply that to syntastic/D.

A proof of concept that is working "for me".

    " Use information about import paths from Dutyl to correctly setup
    " syntastic
    let s:dmd_paths=''
    try
        let s:duty_importPaths=dutyl#core#requireFunctions('importPaths').importPaths()
        for s:path in s:duty_importPaths
            let s:dmd_paths=s:dmd_paths.' '.dutyl#core#shellescape(s:path)
        endfor
    catch "Ignore errors and simply don't use them
    endtry
    let g:syntastic_d_compiler_options = s:dmd_paths

What would you say about adding such an integration in Dutyl?
It would of course required checking if the plugin syntastic is installed etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions