GithubHelp home page GithubHelp logo

ms-jpq / coq_nvim Goto Github PK

View Code? Open in Web Editor NEW
3.5K 16.0 97.0 5.14 MB

Fast as FUCK nvim completion. SQLite, concurrent scheduler, hundreds of hours of optimization.

License: GNU General Public License v3.0

Python 89.83% Lua 5.68% Dockerfile 0.26% PLpgSQL 3.17% Vim Script 0.73% Makefile 0.31% C 0.01% CSS 0.01% TypeScript 0.01%
neovim neovim-plugin completion

coq_nvim's Introduction

coq_nvim's People

Contributors

3rfaan avatar bachhh avatar bakks avatar baodrate avatar cclauss avatar eriedaberrie avatar hicarod avatar ilan-schemoul avatar ilyailya avatar ioreshnikov avatar judaew avatar markjaroski avatar mathjiajia avatar matu3ba avatar mcchrish avatar ms-jpq avatar mte90 avatar nikklassen avatar not-a-duck avatar rcarriga avatar s1n7ax avatar skoenen avatar skylerberg avatar stainless-hao avatar ta-tikoma avatar theleop avatar ultirequiem avatar vegerot avatar zeertzjq avatar zexi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

coq_nvim's Issues

Request for simple working configuration

This plugin is interesting.
But, I am unable to configure auto-complete with LSP.

Following is my minimal vimrc

call plug#begin('~/.vim/plugged')

Plug 'neovim/nvim-lspconfig'
Plug 'ms-jpq/kok.nvim', {'branch': 'kok', 'do': ':UpdateRemotePlugins'}

call plug#end()

lua <<EOF

require("lspconfig").gopls.setup{}
require("kok/recommends").all()

EOF  โŽ

I am unable to see autocomplete without the KoKstart command just like other autocomplete plugins.

  • I am not sure where to put the config.json file. Can you mention this in README?
  • Can you please put minimal working vimrc configuration in README with few sources enabled.
  • The hyperlinks in README are not working (probably not updated after the plugin got renamed). Can you please update?

Package manager to update tabnine. Clarifying tabnine CPU usage.

  1. I dont see a way in the manual to disable downloads.
    I dont understand why it is needed at all, since packer.nvim etc can copy git projects easily.
    Would changing the README to explain how to setup packer etc be okay for you?

  2. The associated issues were closed via some commits (only starting lsp on request and not searching through ignored files).
    Other issues were closed with like 20% CPU usage. Ideally some statistics what to expect on an example project would be nice.

Jump to next snippet location with Tab

Is this possible? I tried setting jump to mark to both <tab> and <c-n> but it didn't seem to change it.

vim.g.coq_settings = {
  ["keymap.jump_to_mark"] = "<c-n>"
}

Adding new source completion?

Thanks for the great work on this plugin ๐Ÿ‘

But i have question,
I use orgmode for note-taking (kristijanhusak/orgmode.nvim), in compe, I just add new line for source orgmode like this:

screenshot_18-Aug-2021_1548

how bout coq_nvim?

Snippets

This works:

require("lspconfig").pyright.setup(coq.lsp_ensure_capabilities({}))

But no snippets:

image

But this dont

vim.schedule(function ()
  local lsp = require "lspconfig"
  require("packer").loader("coq_nvim coq.artifacts")
  lsp.pyright.setup(require("coq")().lsp_ensure_capabilities({}))
end)

What I'm doing wrong?

image

Every other key stroke fails to return results

Thanks for all your work. I'm working on seeing if this could replace the last completion engine I was using and ran into the following odd behavior.

This occurs in multiple languages, but the gist of the problem is that as I type, I'm only getting results on every other keystroke.

Aug-17-2021 13-45-31

Random error popup

Hey,
I get the following error randomly. I could not figure out why it's happening.

my coq config:

local g = vim.g
g.coq_settings = {
    keymap = {jump_to_mark = "<C-p>"},
    display = {pum = {source_context = {"[", "]"}}}

}

packer:

    use {
        'neovim/nvim-lspconfig',
        config = function() require('nvim.plugins.lsp') end,
        requires = {
            {'ms-jpq/coq_nvim', branch = 'coq'},
            {'ms-jpq/coq.artifacts', branch = 'artifacts'}
        }
    }

image

Traceback (most recent call last):
  File "/home/samuel/.local/share/nvim/site/pack/packer/start/coq_nvim/.vars/runtime/lib/python3.9/site-packages/pynvim_pp/logging.py", line 31, in with_suppress                                                           
    yield None
  File "/home/samuel/.local/share/nvim/site/pack/packer/start/coq_nvim/coq/shared/runtime.py", line 152, in cont
    assert not self._lock.locked()
AssertionError
Press ENTER or type command to continue
'NoneType' object is not iterable
Traceback (most recent call last):
  File "/home/samuel/.local/share/nvim/site/pack/packer/start/coq_nvim/.vars/runtime/lib/python3.9/site-packages/pynvim_pp/logging.py", line 31, in with_suppress
    yield None
  File "/home/samuel/.local/share/nvim/site/pack/packer/start/coq_nvim/.vars/runtime/lib/python3.9/site-packages/pynvim_pp/lib.py", line 21, in wrapper
    return await aw
  File "/home/samuel/.local/share/nvim/site/pack/packer/start/coq_nvim/coq/server/registrants/omnifunc.py", line 54, in c0
    vim_comps = tuple(trans(stack, context=ctx, metrics=metrics))
  File "/home/samuel/.local/share/nvim/site/pack/packer/start/coq_nvim/coq/server/trans.py", line 148, in trans
    w_adjust = _cum(stack.settings.weights, metrics=metrics)
  File "/home/samuel/.local/share/nvim/site/pack/packer/start/coq_nvim/coq/server/trans.py", line 25, in _cum
    for metric in metrics:
TypeError: 'NoneType' object is not iterable

Could you share your dotfiles?

It would be useful to be guided when configuring this plugin.

Btw very good work, I really love this plugin, it has made me change almost all my configuration :D

LICENSE file

Would be nice for potential code reuse or works based on coq_nvim etc to know the LICENSE.

Auto imports not triggering for typescript

The plugin seems to work very well (and most importantly, fast as fuck) however, I can't seem to get the auto imports to work. I probably messed something up but I can't quite figure out what. Auto import works fine for me today via the built-in nvim LSP + lspinstall + compe so I think my LSP integration works as it should.

OS: OSX and Linux

After removing compe and trying to get auto imports using coq I end up with this:
image

coq properly prints the correct import path in the pum footer but when I press enter to complete and add the import, the import is never added (although the symbol is auto completed properly). I run this very minimal coq lua config and use the default keybinds:

local coq = require('coq')
...
nvim_lsp[lsp].setup(coq().lsp_ensure_capabilities(lsp_config))

Is this a known issue or do I need to do some deep-diving to figure out what is up with my setup?

COQdeps returns non-zero status code

Output of python3 -V:

Python 3.9.6

Also tried with Python 3.8.11, same result.

Traceback (most recent call last):                                                                                                                                                                                            
  File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main                                                                                                                                                          
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/user/.local/share/nvim/site/pack/packer/opt/coq_nvim/coq/__main__.py", line 58, in <module>
    EnvBuilder(
  File "/usr/lib/python3.9/venv/__init__.py", line 75, in create
    self._setup_pip(context)
  File "/usr/lib/python3.9/venv/__init__.py", line 298, in _setup_pip
    subprocess.check_output(cmd, stderr=subprocess.STDOUT)
  File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/home/user/.local/share/nvim/site/pack/packer/opt/coq_nvim/.vars/runtime/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.

UnicodeEncodeError: 'utf-8' codec can't encode character '\udcc2'

When using coq with trouble.nvim, I'm getting this error any time I press a key.

Traceback:

'utf-8' codec can't encode character '\udcc2' in position 195: surrogates not allowed
Traceback (most recent call last):
  File "/Users/nathan/.local/share/nvim/site/pack/packer/start/coq_nvim/.vars/runtime/lib/python3.9/site-packages/pynvim_pp/logging.py", line 31, in with_suppress
    yield None
  File "/Users/nathan/.local/share/nvim/site/pack/packer/start/coq_nvim/coq/server/registrants/attachment.py", line 56, in cont
    await stack.bdb.set_lines(
  File "/Users/nathan/.local/share/nvim/site/pack/packer/start/coq_nvim/coq/databases/buffers/database.py", line 143, in set_lines
    await run_in_executor(self._ex.submit, cont)
  File "/Users/nathan/.local/share/nvim/site/pack/packer/start/coq_nvim/.vars/runtime/lib/python3.9/site-packages/std2/asyncio/_prelude.py", line 41, in run_in_executor
    return await loop.run_in_executor(None, cont)
  File "/Users/nathan/.pyenv/versions/3.9.6/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/Users/nathan/.local/share/nvim/site/pack/packer/start/coq_nvim/coq/shared/executor.py", line 33, in submit
    return cast(T, fut.result())
  File "/Users/nathan/.pyenv/versions/3.9.6/lib/python3.9/concurrent/futures/_base.py", line 445, in result
    return self.__get_result()
  File "/Users/nathan/.pyenv/versions/3.9.6/lib/python3.9/concurrent/futures/_base.py", line 390, in __get_result
    raise self._exception
  File "/Users/nathan/.local/share/nvim/site/pack/packer/start/coq_nvim/coq/shared/executor.py", line 24, in cont
    ret = f(*args, **kwargs)
  File "/Users/nathan/.local/share/nvim/site/pack/packer/start/coq_nvim/coq/databases/buffers/database.py", line 128, in cont
    cursor.executemany(sql("insert", "line"), m1())
UnicodeEncodeError: 'utf-8' codec can't encode character '\udcc2' in position 195: surrogates not allowed
Press ENTER or type command to continue

More user-friendly customization with respect to keybindings (documentation)

Currently there are some "sane defaults" set by the author, which users can use by having coq_settings.keymap.recommended remain true.
These are then translated to the relevant keybindings.

    if mapping.recommended:
        keymap.i("<esc>", expr=True) << "pumvisible() ? '<c-e><esc>' : '<esc>'"
        keymap.i("<c-c>", expr=True) << "pumvisible() ? '<c-e><c-c>' : '<c-c>'"
        keymap.i("<bs>", expr=True) << "pumvisible() ? '<c-e><bs>' : '<bs>'"
        (
            keymap.i("<cr>", expr=True)
            << "pumvisible() ? (complete_info().selected == -1 ? '<c-e><cr>' : '<c-y>') : '<cr>'"
        )
        keymap.i("<tab>", expr=True) << "pumvisible() ? '<c-n>' : '<tab>'"
        keymap.i("<s-tab>", expr=True) << "pumvisible() ? '<c-p>' : '<bs>'"

What I would like to see, is to have each and every keybinding exposed to the user slightly more explicitly so the user can customize each one individually by just a copy and paste and then applying very minor edits.
So the user can change only the <tab> and <s-tab> part of the recommended settings if they prefer <c-n> and <c-p> for browsing completion results for instance, without having to redefine all other recommended keybindings.

This probably boils down to just a mere documentation change for the KEYBIND.md file.
Maybe by simply adding these to the markdown file, users may get a better idea how to customize the defaults to their liking.

" Coq default keybindings
ino <silent><expr> <Esc>   pumvisible() ? "\<C-e><Esc>" : "\<Esc>"
ino <silent><expr> <C-c>   pumvisible() ? "\<C-e><C-c>" : "\<C-c>"
ino <silent><expr> <BS>    pumvisible() ? "\<C-e><BS>"  : "\<BS>"
ino <silent><expr> <CR>    pumvisible() ? (complete_info().selected == -1 ? "\<C-e><CR>" : "\<C-y>") : "\<CR>"
ino <silent><expr> <Tab>   pumvisible() ? "\<C-n>" : "\<Tab>"
ino <silent><expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<BS>"

Thanks for reading. Have a nice day. ๐ŸŒž

Tabnine can't be installed

Hi, I'm currently trying this wonderful plugin, but i'm getting the current error after enabling tabnine and running :COQnow :

[Errno 18] Invalid cross-device link: '/tmp/tmpbf8w4pkx' -> '/home/michaelb/.local/share/nvim/plugged/coq_nvim/.vars/cli
ents/t9/TabNine'                                                                                                        
Traceback (most recent call last):                                                                                      
  File "/home/michaelb/.local/share/nvim/plugged/coq_nvim/.vars/runtime/lib/python3.9/site-packages/pynvim_pp/logging.py
", line 31, in with_suppress                                                                                            
    yield None                                                                                                          
  File "/home/michaelb/.local/share/nvim/plugged/coq_nvim/.vars/runtime/lib/python3.9/site-packages/pynvim_pp/lib.py", l
ine 21, in wrapper                                                                                                      
    return await aw                                                                                                     
  File "/home/michaelb/.local/share/nvim/plugged/coq_nvim/coq/clients/t9/worker.py", line 119, in _install              
    self._installed = await ensure_updated(                                                                             
  File "/home/michaelb/.local/share/nvim/plugged/coq_nvim/coq/clients/t9/install.py", line 77, in ensure_updated        
    await run_in_executor(_update, timeout=timeout)                                                                     
  File "/home/michaelb/.local/share/nvim/plugged/coq_nvim/.vars/runtime/lib/python3.9/site-packages/std2/asyncio/_prelud
e.py", line 41, in run_in_executor                                                                                      
    return await loop.run_in_executor(None, cont)                                                                       
  File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run                                               
    result = self.fn(*self.args, **self.kwargs)                                                                         
  File "/home/michaelb/.local/share/nvim/plugged/coq_nvim/coq/clients/t9/install.py", line 68, in _update               
    Path(fd.name).replace(T9_BIN)                                                                                       
  File "/usr/lib/python3.9/pathlib.py", line 1385, in replace                                                           
    self._accessor.replace(self, target)                                                                                
OSError: [Errno 18] Invalid cross-device link: '/tmp/tmpbf8w4pkx' -> '/home/michaelb/.local/share/nvim/plugged/coq_nvim/
.vars/clients/t9/TabNine'

I figure that's because I actually use different partition for / and /home and/or have a BTRFS setup, but that should probably be supported. There's usually a cross-device-safe alternative like shutil to in-library methods.

Is istance vs. instance an intentional choice?

codespell - -ignore-words-list="thats,wit" --skip="*.po,*.yml"

./coq_nvim/coq/server/reviewer.py:55: istance ==> instance
./coq_nvim/coq/server/trans.py:113: istance ==> instance
./coq_nvim/coq/shared/runtime.py:48: istance ==> instance
./coq_nvim/coq/shared/types.py:31: Trigged ==> Triggered
./coq_nvim/coq/shared/types.py:33: Trigged ==> Triggered

What is the use case for the AGP bot?

I saw that every day, the agp bot pushes commit to this repo, but it actually does nothing. What is the use for that agp bot? To keep this repo active or it has real usage?

Sqlite traceback

Hello. This is the current traceback when I am trying to use this

near "ON": syntax error
Traceback (most recent call last):
  File "/home/evanr/.config/nvim/plugged/coq_nvim/.vars/runtime/lib/python3.9/site-packages/pynvim_pp/logging.py", line 31, in with_suppress
    yield None
  File "/home/evanr/.config/nvim/plugged/coq_nvim/.vars/runtime/lib/python3.9/site-packages/pynvim_pp/lib.py", line 21, in wrapper
    return await aw
  File "/home/evanr/.config/nvim/plugged/coq_nvim/coq/server/registrants/autocmds.py", line 167, in cont
    await stack.bdb.ft_update(buf.number, filetype=ft)
  File "/home/evanr/.config/nvim/plugged/coq_nvim/coq/databases/buffers/database.py", line 83, in ft_update
    await run_in_executor(self._ex.submit, cont)
  File "/home/evanr/.config/nvim/plugged/coq_nvim/.vars/runtime/lib/python3.9/site-packages/std2/asyncio/_prelude.py", line 41, in run_in_executor
    return await loop.run_in_executor(None, cont)
  File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/evanr/.config/nvim/plugged/coq_nvim/coq/shared/executor.py", line 33, in submit
    return cast(T, fut.result())
  File "/usr/lib/python3.9/concurrent/futures/_base.py", line 440, in result
    return self.__get_result()
  File "/usr/lib/python3.9/concurrent/futures/_base.py", line 389, in __get_result
    raise self._exception
  File "/home/evanr/.config/nvim/plugged/coq_nvim/coq/shared/executor.py", line 24, in cont
    ret = f(*args, **kwargs)
  File "/home/evanr/.config/nvim/plugged/coq_nvim/coq/databases/buffers/database.py", line 81, in cont
    _ensure_buffer(cursor, buf_id=buf_id, filetype=filetype)
  File "/home/evanr/.config/nvim/plugged/coq_nvim/coq/databases/buffers/database.py", line 21, in _ensure_buffer
    cursor.execute(
sqlite3.OperationalError: near "ON": syntax error

I am using the latest DEV release of NVIM and Python3.9.2

I can provide any other details that you need.

Thanks!

Feature Idea: Inline suggestion using virtual text like fish shell

An example from the fish shell website
image

Fish shell implements a kind of 'inline' suggestions, wherein the first completion is showed as dull text after the cursor, the user can hit to get that completion, and then hit it again to get the full list.

I think something similar to the first part could be implemented using virtual text from neovim. Plus some configuration and keymaps to choose when to expand the full completion list, when to accept the first suggestion, when to cycle completion in virtual without opening the completion list, etc

The current completion popup window works fine, and should be the default for parity with other IDE, but this behaviour could be a more sleek and less visually disruptive way of presenting autocompletions for some people

(I also asked about this idea to compe but it hasn't been implemented yet)

cgn does not insert entire completion text

Running cgn on highlighted text and replacing with a completion doesn't work.

Run *ncgnimp<C-n><CR><Esc>. on the following:

hello
hello

Expected result:

import
import

Actual result:

import
imp

Off topic

Side note: it would be neat to also have vim's default behavior of inserting the completion text without needing to hit enter so it's one less keystroke, i.e. *ncgnimp<C-n><Esc>..

EDIT: I fixed this by overriding the <CR> binding:

inoremap <silent><expr> <Esc> pumvisible() ? (complete_info().selected == -1 ? "\<Esc>" : "\<C-y>\<Esc>") : "\<Esc>"

sqlite3.OperationalError: no such column: TRUE

On any keypress, I get

sqlite3.OperationalError: no such column: TRUE 

Full Trace:

Traceback (most recent call last):
File "~/.vim/plugged/coq_nvim/.vars/runtime/lib/python3.8/site-packages/pynvim_pp/logging.py", line 31, in with_suppress
 yield None                                                                                                                                                                                                                                                 File "~/.vim/plugged/coq_nvim/coq/server/registrants/attachment.py", line 56, in cont
await stack.bdb.set_lines(                                                                                                                                                                                                                                 File "~/.vim/plugged/coq_nvim/coq/databases/buffers/database.py", line 152, in set_lines
await run_in_executor(self._ex.submit, cont)                                                                                                                                                                                                               File "~/.vim/plugged/coq_nvim/.vars/runtime/lib/python3.8/site-packages/std2/asyncio/_prelude.py", line 41, in run_in_executor
return await loop.run_in_executor(None, cont)
File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "~/.vim/plugged/coq_nvim/coq/shared/executor.py", line 33, in submit 
return cast(T, fut.result())
File "/usr/lib/python3.8/concurrent/futures/_base.py", line 444, in result
return self.__get_result()
File "/usr/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
raise self._exception
File "~/.vim/plugged/coq_nvim/coq/shared/executor.py", line 24, in cont
ret = f(*args, **kwargs)
File "~/.vim/plugged/coq_nvim/coq/databases/buffers/database.py", line 128, in cont
cursor.execute(
sqlite3.OperationalError: no such column: TRUE   

I just installed the latest version of sqlite3 (3.26?)

Cannot import 'join'

When typing any command :COQ:

Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/user/.local/share/nvim/site/pack/packer/opt/coq_nvim/coq/main.py", line 6, in
from shlex import join
ImportError: cannot import name 'join'

Possible to use without auto completion?

Is it possible to use coq without the popup window and just open a popup when pressing <c-space>?
If yes, would it still cache results in the background?

It's really fast but I'd prefer no autocompletion ๐Ÿ‘

LSP Setup Not Working: `attempt to index local 'coq'`

Saw your reddit post last night and I'm excited to try this out. Having some trouble installing it and getting it to work.

From the readme:

Install the Nvim Official LSP integration

Requires 1 line of change to support LSP snippets

local lsp = require "lspconfig"

lsp.<server>.setup(<stuff...>)                              -- before
lsp.<server>.setup(coq.lsp_ensure_capabilities(<stuff...>)) -- after

When I do this and then open neovim I get an error of

Error detected while processing /Users/sambernheim/.config/nvim/init.vim:
line  201:
E5108: Error executing lua [string ":lua"]:53: attempt to index local 'coq' (a function value)

My lsp config setup currently is

lspconfig.tsserver.setup{
    root_dir = lspconfig.util.root_pattern("package.json", "tsconfig.json", ".git")
}

Following your suggestions I make it

lspconfig.tsserver.setup{
    coq.lsp_ensure_capabilities(
        root_dir = lspconfig.util.root_pattern("package.json", "tsconfig.json", ".git")
    )
}

and then I see the error.
I've also tried several different variations (parentheses instead of curly braces, removing the root_dir line, etc)

I'm on an M1 Mac if its relevant. I've run COQdeps and COQnow as well and both succeeded.

I think at least one other person on the reddit thread is also having this issue.

coq with nix

Basically the same issue as ms-jpq/chadtree#110 (which the provided solution was not working for me some minutes ago).
Nix support would be nice :)

How to import coq

In the readme it shows following snippet.

local lsp = require "lspconfig"

lsp.<server>.setup(<stuff...>)                              -- before
lsp.<server>.setup(coq.lsp_ensure_capabilities(<stuff...>)) -- after

Apparently require('coq') is a function and what needs to be passed in to the function?

Automatically start?

Is there a more graceful way to start coq when vim starts besides au BufEnter * :COQnow<CR>, or is that the way I'm supposed to do it?

Edit: I'd also like it if I could get the No snippets loaded message to not show. I passed [--shut-up].

Error starting python process when python is symlinked

I get the following error when running :COQnow

E5108: Error executing lua Vim:E475: Invalid value for argument cmd: '~/.pyenv/versions/neovim3/bin/python' is not executable

I specify the python interpreters used by nvim as follows:

let g:python3_host_prog='~/.pyenv/versions/neovim3/bin/python'
let g:python_host_prog='~/.pyenv/versions/neovim/bin/python'

Running :checkhealth confirms that (apparently) nvim is fine with my choice of Python interpreters. Just as a sanity check I confirmed that indeed the specified interpreters are executable

โฏ ls -lh ~/.pyenv/versions/neovim3/bin/python
Permissions Size User     Date Modified Name
lrwxr-xr-x     9 garfield 24 Sep  2020  /Users/garfield/.pyenv/versions/neovim3/bin/python -> python3.8

Maybe it's the symlink?

Edit:
I tried to remove the python_host_prog so that I use the global Python interpreter and everything works then. So it looks like it's the symlink created by pyenv.

Shut up on autostart

There's the --shut-up flag for :COQnow, but when using the auto_start option, I haven't been able to find a way to mute the welcome message.

Have I missed it, or would it need to be added?

COQnow throws error regarding \u2728 (sparkles character??)

Running COQnow, on a recent reinstall with Packer (after running COQnow) with both coq + the snippets codebase gives this error:

image

Looking up \u2728 returns the sparkles emoji?? Error is the same on neovide as is on windows terminal, plugin is on the start folder. Error is after the first character is inserted.

How to run COQnow on startup?

I don't really want to have to run COQnow everytime

I tried to run it in init.lua but its giving me an error that it is not an editor command

some questions

Yes, It's fast. But I still have some questions:

  1. How to define user snippets?
  2. How to auto expand completion on tab?
  3. Relative path not starting with ./ can not trigger path completion. But <c-x><c-f> can. For example in home directory, type .config/ then <c-space> won't suggest paths.
  4. Path completion does not work well with upper case character. For example ./.config/b suggests ./.config/BaiduPCS-Go/, but ./.config/B does not.
  5. In python, <c-space> is needed when importing each package and the first two modules. For example from torch import abs, cuda. Can this be automaticly triggered.

Thanks!

Feature: Look-ahead search to be even faster

I am proposing an idea to make coq_nvim even faster, if you feel like it is necessary. The idea is that if we can predict the next keystroke accurately, we could already run the search on the line of code + the predicted character during the idle time between two keystrokes. When the user presses the right keystroke, we just have to display the result instead of doing the search and then displaying.

Issues to address and make this idea work:

  1. How to predict the next key?

That can be done with various degrees of complexity, if we want to be fast we can use a markov chain fitted on some source code from github. Once fitted on some dataset, it is basically a lookup table. For a given letter, it gives the probability of the next letters following. If I press 'i', then 'm' (import) or ' ' (for i in...) will be likely in python, but not 'y' for instance. What is important is to quantify the hit and miss rate in practice.

  1. What happens if we can't predict accurately?
    We can run multiple searches on the different most probable next letters. If we press another letter than predicted, we drop the search altogether and fallback to the normal non-predictive version of the search. I suppose it can also be optimized for not completely dropping the search and help the fuzzy search?

We could have multiple threads running, let's say 4 and they would look for the 4 most likely next keystrokes.

Example:
Let's assume only one thread is available at all times.

  • I type 'i'
  • The engine gives the regular suggestions for 'i'
  • There is some idle time, so it predicts that 'm' (10%) and ' ' (5%) are likely, so it searches for 'im' (most likely option)
  • I type 'm'
  • The engine prints the already searched suggestions for 'im'
  • There is some idle time, 'p' is the most likely, so the look-ahead search begins
  • I type an 'a'
  • The engine drops the look-ahead search if it is still running and searches on-the-fly for 'ima'

There is already some look ahead going on in the code but I am not certain what it entices, so maybe this - or something similar - is already implemented? Sorry if I just invented the square wheel :)

RTP not found

When running the plugin as mentioned in the readme, when starting it it says, RTP not found from lua/coq.lua in 9th line

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.