ziglang / zig.vim

Vim configuration for Zig
MIT License
430 stars 55 forks source link

Allow disabling default style settings #89

Open DaQueenJodi opened 1 year ago

DaQueenJodi commented 1 year ago

Plugins like python.vim, rust.vim etc also set the tabstop, shiftwidth, etc for the recommended styling of the language but they all have a (i.e) g:python_recommended_style variable you can set to false to disable that I think it would be a good idea to do the same here since I (and I'm sure many others) don't like plugins changing the indentation spacing and other settings

DaQueenJodi commented 1 year ago

Im not a vim plugin developer but this is how rust.vim does it, seems relatively simple:

if get(g:, 'rust_recommended_style', 1)
    let b:rust_set_style = 1
    setlocal shiftwidth=4 softtabstop=4 expandtab
    setlocal textwidth=99
endif