Add Neovim/Vim8 option to config wizard

This commit adds minimal config option for Neovim/Vim8 editors
in the config wizard. It assumes use of CoC engine to facilitate
LSP.
This commit is contained in:
Jakub Konka 2020-05-28 18:55:16 +02:00
parent 0720452217
commit 665bb8d32e

View File

@ -34,7 +34,7 @@ pub fn config(step: *std.build.Step) anyerror!void {
std.debug.warn("Successfully saved configuration options!\n", .{}); std.debug.warn("Successfully saved configuration options!\n", .{});
const editor = try zinput.askSelectOne("Which code editor do you use?", enum { VSCode, Sublime, Kate, Other }); const editor = try zinput.askSelectOne("Which code editor do you use?", enum { VSCode, Sublime, Kate, Neovim, Vim8, Other });
std.debug.warn("\n", .{}); std.debug.warn("\n", .{});
switch (editor) { switch (editor) {
@ -78,6 +78,20 @@ pub fn config(step: *std.build.Step) anyerror!void {
\\}} \\}}
, .{}); , .{});
}, },
.Neovim, .Vim8 => {
std.debug.warn(
\\To use ZLS in Neovim/Vim8, we recommend using CoC engine. You can get it from 'https://github.com/neoclide/coc.nvim'.
\\Then, simply issue cmd from Neovim/Vim8 `:CocConfig`, and add this to your CoC config:
\\{{
\\ "lanuageserver": {{
\\ "zls" : {{
\\ "command": "command_or_path_to_zls",
\\ "filetypes": ["zig"]
\\ }}
\\ }}
\\}}
, .{});
},
.Other => { .Other => {
std.debug.warn( std.debug.warn(
\\We might not *officially* support your editor, but you can definitely still use ZLS! \\We might not *officially* support your editor, but you can definitely still use ZLS!