Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/yatli/fvim
Browse files Browse the repository at this point in the history
  • Loading branch information
yatli committed Oct 30, 2020
2 parents 88fd758 + d01a200 commit 03f1cd7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions getopt.fs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type Options =
stderrenc: System.Text.Encoding
serveropts: ServerOptions
debugMultigrid: bool
norc: bool
}

let parseOptions (args: string[]) =
Expand Down Expand Up @@ -119,6 +120,11 @@ let parseOptions (args: string[]) =
| [| ParseIp ipaddr; ParseUInt16 port |] -> Tcp(IPEndPoint(ipaddr, int port))
| _ -> NamedPipe connect.Value

let norc =
args
|> List.pairwise
|> List.exists( (=) ("-u", "NORC") )

{
logToStdout = trace_to_stdout
logToFile = trace_to_file
Expand All @@ -129,5 +135,6 @@ let parseOptions (args: string[]) =
stderrenc = enc
intent = intent
debugMultigrid = debug_multigrid
norc = norc
}

5 changes: 3 additions & 2 deletions model.fs
Original file line number Diff line number Diff line change
Expand Up @@ -649,8 +649,9 @@ let Start (opts: getopt.Options) =


// trigger ginit upon VimEnter
let! _ = Async.AwaitTask(nvim.command "autocmd VimEnter * runtime! ginit.vim")
()
if not opts.norc then
let! _ = Async.AwaitTask(nvim.command "autocmd VimEnter * runtime! ginit.vim")
()
} |> Async.RunSynchronously

let Flush =
Expand Down

0 comments on commit 03f1cd7

Please sign in to comment.