import { cscope_connection } from "https://deno.land/x/denops_std@v6.3.0/function/vim/mod.ts";
Checks for the existence of a cscope
connection. If no
parameters are specified, then the function returns:
0, if cscope was not available (not compiled in), or
if there are no cscope connections;
1, if there is at least one cscope connection.
If parameters are specified, then the value of {num} determines how existence of a cscope connection is checked:
{num} Description of existence check
0 Same as no parameters (e.g., "cscope_connection()"). 1 Ignore {prepend}, and use partial string matches for {dbpath}. 2 Ignore {prepend}, and use exact string matches for {dbpath}. 3 Use {prepend}, use partial string matches for both {dbpath} and {prepend}. 4 Use {prepend}, use exact string matches for both {dbpath} and {prepend}.
Note: All string comparisons are case sensitive!
Examples. Suppose we had the following (from ":cs show"):
# pid database name prepend path
0 27664 cscope.out /usr/local
Invocation Return Val
cscope_connection() 1
cscope_connection(1, "out") 1
cscope_connection(2, "out") 0
cscope_connection(3, "out") 0
cscope_connection(3, "out", "local") 1
cscope_connection(4, "out") 0
cscope_connection(4, "out", "local") 0
cscope_connection(4, "cscope.out", "/usr/local") 1