Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@pynvim.command('MarksmanOpenFirstMatch', nargs='1', range='', sync=True)
def openFirstMatch(self, args, _):
self._lazyInit()
assert len(args) == 2 or len(args) == 1, 'Wrong number of arguments to MarksmanOpenNextMatch'
rootPath = self._getCanonicalPath(args[0])
assert os.path.isdir(rootPath), f"Could not find directory '{rootPath}'"
if len(args) == 1:
id = ''
else:
id = args[1]
projectInfo = self._getProjectInfo(rootPath)
@pynvim.command('MarksmanProfileSearchMethods', nargs='1', range='', sync=True)
def profileSearchMethods(self, args, _):
self._lazyInit()
dirPath = self._getCanonicalPath(args[0])
for i in range(2):
self._log.info(f'Round {i+1}:')
invalidTypes = []
for searchType in SearchTypes:
startTime = datetime.now()
fileIterator = self._tryScanForFilesUsingSearchType(searchType, dirPath, False)
if not fileIterator:
@pynvim.command('MarksmanOpenNextMatch', nargs='1', range='', sync=True)
def openNextMatch(self, args, _):
self._lazyInit()
assert len(args) == 1, 'Wrong number of arguments to MarksmanOpenNextMatch'
rootPath = self._getCanonicalPath(args[0])
assert os.path.isdir(rootPath), f"Could not find directory '{rootPath}'"
projectInfo = self._getProjectInfo(rootPath)
self._waitForProjectToInitialize(projectInfo)
currentPath = self._getCanonicalPath(self._nvim.eval('expand("%:p")'))
id = self._getFileNameHumps(os.path.basename(currentPath))
@neovim.command('Semshi', nargs='*', complete='customlist,SemshiComplete',
sync=True)
def cmd_semshi(self, args):
if not args:
self.echo('This is semshi.')
return
try:
func = _subcommands[args[0]]
except KeyError:
self.echo_error('Subcommand not found: %s' % args[0])
return
func(self, *args[1:])