ProjectParser heuristics broken
If I take the tar.gz from Software Foundations, make it, and then open neovim on Lists.v (from within the directory contained in the tar.gz), I can't get the imports working. Seems to be some kind of conflict between -R which Coquille inserts (why?) and -Q which is specified in the _CoqProject, which seems to be parsed correctly.
I changed the code to only guess -R when there is no Q. Possibly, it should only guess if all of the lists are empty. I just started with Coq so I am clueless.
diff --git a/rplugin/python3/pycoqtop/projectparser.py b/rplugin/python3/pycoqtop/projectparser.py
index a2d2232..064f4b7 100644
--- a/rplugin/python3/pycoqtop/projectparser.py
+++ b/rplugin/python3/pycoqtop/projectparser.py
@@ -1,6 +1,6 @@
class ProjectParser():
def __init__(self, filename):
- self.R = [('.', '')]
+ self.R = []
self.Q = []
self.I = []
self.coqtop = 'coqtop'
@@ -23,6 +23,9 @@ class ProjectParser():
if 'COQBIN' in self.variables:
self.coqtop = self.variables['COQBIN'] + '/coqtop'
+ if self.Q == []:
+ self.R.append(('.', ''))
+
def parseLine(self, sline):
if len(sline) < 2:
return
Edited by Janus Troelsen