Thursday, March 28, 2024

Re: Help with pynvim for neovim needed

> What I did not understand, why this pynvim is under Python3.11 and not under active Python3.12.

Maybe the pip command was installed under Python 3.11. Afterwards python3 was updated to Python 3.12, but pip still relies on python3.11 ?
For example, here

less `which pip` | head -2

shows

#!/usr/bin/python3.11
Le mercredi 27 mars 2024 à 19:59:36 UTC+1, Marek Stepanek a écrit :
Thx Enno for the reply. I meanwhile could resolve the problem. I activated a virtual environment for Python with the help of https://python.land/virtual-environments/virtualenv#google_vignette

Here shortly the commands I entered (if somebody is looking for this problem):

being the the folder of /usr/local/Cellar

mkdir -p python/myenv
virtualenv python/myenv
created virtual environment CPython3.11.8.final.0-64 in 793ms
creator CPython3macOsBrew(dest=/usr/local/Cellar/python/myenv, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/mstep/Library/Application Support/virtualenv)
added seed packages: pip==24.0, setuptools==69.1.0, wheel==0.42.0
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

source python/myenv/bin/activate

pip3 install --upgrade pynvim
Collecting pynvim
Using cached pynvim-0.5.0-py2.py3-none-any.whl.metadata (469 bytes)
Collecting msgpack>=0.5.0 (from pynvim)
Downloading msgpack-1.0.8-cp311-cp311-macosx_10_9_x86_64.whl.metadata (9.1 kB)
Collecting greenlet>=3.0 (from pynvim)
Using cached greenlet-3.0.3-cp311-cp311-macosx_11_0_universal2.whl.metadata (3.8 kB)
Using cached pynvim-0.5.0-py2.py3-none-any.whl (45 kB)
Using cached greenlet-3.0.3-cp311-cp311-macosx_11_0_universal2.whl (271 kB)
Downloading msgpack-1.0.8-cp311-cp311-macosx_10_9_x86_64.whl (87 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 88.0/88.0 kB 2.4 MB/s eta 0:00:00
Installing collected packages: msgpack, greenlet, pynvim
Successfully installed greenlet-3.0.3 msgpack-1.0.8 pynvim-0.5.0

/usr/local/bin/python3 -m pip install pynvim


/usr/local/Cellar/python/myenv/bin $ pip3 install --upgrade pynvim
Requirement already satisfied: pynvim in /usr/local/Cellar/python/myenv/lib/python3.11/site-packages (0.5.0)
Requirement already satisfied: msgpack>=0.5.0 in /usr/local/Cellar/python/myenv/lib/python3.11/site-packages (from pynvim) (1.0.8)
Requirement already satisfied: greenlet>=3.0 in /usr/local/Cellar/python/myenv/lib/python3.11/site-packages (from pynvim) (3.0.3)

What I did not understand, why this pynvim is under Python3.11 and not under active Python3.12. I have had to adapt my init.vim with:

let g:python3_host_prog='/usr/local/bin/python3' => let g:python3_host_prog='/usr/local/bin/python3.11'

VimR and Neovim is working now.


Thx for your patience


marek


> On 26. Mar 2024, at 10:38, Enno <enno....@gmail.com> wrote:
>
> It is not clear what is to be achieved, but for Python support in Vim one should ensure that `!python3 -V`, and `:python3 import sys; print(sys.version)")` coincide. For Neovim, I'd refer to the experts at https://github.com/neovim/neovim/issues/
>
> Le lundi 25 mars 2024 à 17:55:45 UTC+1, Marek Stepanek a écrit :
> Hello all,
>
>
> could some patient soul could help me out? I am at the point to give up.
>
> macOS Sonoma 14.4 Intel (2018)
>
> Homebrew newest upgrade
>
> vimr 0.44.0
>
> I am not Python coder (old school: Perl!). So forgive me my innocence. I suppose the modul pynvim should be installed outside of Homebrew?
>
> First what is in my config-file?
>
> ~/.config/nvim/init.vim
>
> let g:python3_host_prog='/usr/local/bin/python3'
> let g:loaded_python_provider = 0
> set pyxversion=3
>
>
> In Vimr or Neovim :checkhelth I get:
>
> ## Python 3 provider (optional)
>
> - INFO: Using: g:python3_host_prog = "/usr/local/bin/python3"
> - INFO: Executable: /usr/local/bin/python3
> - ERROR: Command error (job=20, exit code 1): `'/usr/local/bin/python3' -c 'import
>
> stderr: Traceback (most recent call last): File "<string>", line 1, in <module>M
> - INFO: Python version: 3.12.2
> - INFO: pynvim version: unable to load neovim Python module
> - ERROR: pynvim is not installed.
>
> Error: unable to load neovim Python module
> - ADVICE:
>
> - Run in shell: /usr/local/bin/python3 -m pip install pynvim
>
> But this advice to install with pip (or pip3) is meanwhile deprecated. My attempts to install it, little excerpt look like this:
>
> $ which python
> python not found
>
> $ which python3
> /usr/local/bin/python3
> $ which pip3
> /usr/local/bin/pip3
>
> $ brew uninstall python3 # if I remember well with -force
> $ brew install python3
> $ ll `which python3`
> lrwxr-xr-x 1 mstep admin 42B 24 Mar 18:20 /usr/local/bin/python3@ -> ../Cellar/pyt...@3.12/3.12.2_1/bin/python3
> $ ll `which pip3`
> lrwxr-xr-x 1 mstep admin 39B 24 Mar 18:20 /usr/local/bin/pip3@ -> ../Cellar/pyt...@3.12/3.12.2_1/bin/pip3
>
> $ /usr/local/bin/python3 -m pip install pynvim
> error: externally-managed-environment
>
> $ brew install python3
> × This environment is externally managed
> ╰─> To install Python packages system-wide, try brew install
> xyz, where xyz is the package you are trying to
> install.
>
> If you wish to install a non-brew-packaged Python package,
> create a virtual environment using python3 -m venv path/to/venv.
> Then use path/to/venv/bin/python and path/to/venv/bin/pip.
>
> If you wish to install a non-brew packaged Python application,
> it may be easiest to use pipx install xyz, which will manage a
> virtual environment for you. Make sure you have pipx installed.
>
> note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
> hint: See PEP 668 for the detailed specification.
>
> Same error with:
> $ pip3 install pynvim
> $ pip3 install --upgrade pynvim
>
> I tried to copy the pynvim from python3.11 to python3.12 (don't shout on me!)
>
> $ cp -r python3.11/site-packages/pynvim python3.12/site-packages
> $ cp -r python3.11/site-packages/pynvim-0.5.0.dist-info python3.12/site-packages
>
> Ok! that means I have to create a virtual environment for python-packages!
> Where you suggest to put the python packages? What path to use for the virtualenv of python?
>
> I tried with:
>
> $ brew install pipx
> $ pipx install pynvim
> No apps associated with package pynvim or its dependencies. If you are attempting to install a library, pipx should
> not be used. Consider using pip or a similar tool instead.
>
> Please a little hint! I would be very grateful for any help
>
>
> marek
>
>
>
>
>
>
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/4e1f60e4-af0e-4f69-a2d7-e159f0013c49n%40googlegroups.com.


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/74755507-a210-4abb-99ed-72f0220c060en%40googlegroups.com.

Wednesday, March 27, 2024

Re: Help with pynvim for neovim needed

Thx Enno for the reply. I meanwhile could resolve the problem. I activated a virtual environment for Python with the help of https://python.land/virtual-environments/virtualenv#google_vignette

Here shortly the commands I entered (if somebody is looking for this problem):

being the the folder of /usr/local/Cellar

mkdir -p python/myenv
virtualenv python/myenv
created virtual environment CPython3.11.8.final.0-64 in 793ms
creator CPython3macOsBrew(dest=/usr/local/Cellar/python/myenv, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/mstep/Library/Application Support/virtualenv)
added seed packages: pip==24.0, setuptools==69.1.0, wheel==0.42.0
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

source python/myenv/bin/activate

pip3 install --upgrade pynvim
Collecting pynvim
Using cached pynvim-0.5.0-py2.py3-none-any.whl.metadata (469 bytes)
Collecting msgpack>=0.5.0 (from pynvim)
Downloading msgpack-1.0.8-cp311-cp311-macosx_10_9_x86_64.whl.metadata (9.1 kB)
Collecting greenlet>=3.0 (from pynvim)
Using cached greenlet-3.0.3-cp311-cp311-macosx_11_0_universal2.whl.metadata (3.8 kB)
Using cached pynvim-0.5.0-py2.py3-none-any.whl (45 kB)
Using cached greenlet-3.0.3-cp311-cp311-macosx_11_0_universal2.whl (271 kB)
Downloading msgpack-1.0.8-cp311-cp311-macosx_10_9_x86_64.whl (87 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 88.0/88.0 kB 2.4 MB/s eta 0:00:00
Installing collected packages: msgpack, greenlet, pynvim
Successfully installed greenlet-3.0.3 msgpack-1.0.8 pynvim-0.5.0

/usr/local/bin/python3 -m pip install pynvim


/usr/local/Cellar/python/myenv/bin $ pip3 install --upgrade pynvim
Requirement already satisfied: pynvim in /usr/local/Cellar/python/myenv/lib/python3.11/site-packages (0.5.0)
Requirement already satisfied: msgpack>=0.5.0 in /usr/local/Cellar/python/myenv/lib/python3.11/site-packages (from pynvim) (1.0.8)
Requirement already satisfied: greenlet>=3.0 in /usr/local/Cellar/python/myenv/lib/python3.11/site-packages (from pynvim) (3.0.3)

What I did not understand, why this pynvim is under Python3.11 and not under active Python3.12. I have had to adapt my init.vim with:

let g:python3_host_prog='/usr/local/bin/python3' => let g:python3_host_prog='/usr/local/bin/python3.11'

VimR and Neovim is working now.


Thx for your patience


marek


> On 26. Mar 2024, at 10:38, Enno <enno.nagel@gmail.com> wrote:
>
> It is not clear what is to be achieved, but for Python support in Vim one should ensure that `!python3 -V`, and `:python3 import sys; print(sys.version)")` coincide. For Neovim, I'd refer to the experts at https://github.com/neovim/neovim/issues/
>
> Le lundi 25 mars 2024 à 17:55:45 UTC+1, Marek Stepanek a écrit :
> Hello all,
>
>
> could some patient soul could help me out? I am at the point to give up.
>
> macOS Sonoma 14.4 Intel (2018)
>
> Homebrew newest upgrade
>
> vimr 0.44.0
>
> I am not Python coder (old school: Perl!). So forgive me my innocence. I suppose the modul pynvim should be installed outside of Homebrew?
>
> First what is in my config-file?
>
> ~/.config/nvim/init.vim
>
> let g:python3_host_prog='/usr/local/bin/python3'
> let g:loaded_python_provider = 0
> set pyxversion=3
>
>
> In Vimr or Neovim :checkhelth I get:
>
> ## Python 3 provider (optional)
>
> - INFO: Using: g:python3_host_prog = "/usr/local/bin/python3"
> - INFO: Executable: /usr/local/bin/python3
> - ERROR: Command error (job=20, exit code 1): `'/usr/local/bin/python3' -c 'import
>
> stderr: Traceback (most recent call last): File "<string>", line 1, in <module>M
> - INFO: Python version: 3.12.2
> - INFO: pynvim version: unable to load neovim Python module
> - ERROR: pynvim is not installed.
>
> Error: unable to load neovim Python module
> - ADVICE:
>
> - Run in shell: /usr/local/bin/python3 -m pip install pynvim
>
> But this advice to install with pip (or pip3) is meanwhile deprecated. My attempts to install it, little excerpt look like this:
>
> $ which python
> python not found
>
> $ which python3
> /usr/local/bin/python3
> $ which pip3
> /usr/local/bin/pip3
>
> $ brew uninstall python3 # if I remember well with -force
> $ brew install python3
> $ ll `which python3`
> lrwxr-xr-x 1 mstep admin 42B 24 Mar 18:20 /usr/local/bin/python3@ -> ../Cellar/pyt...@3.12/3.12.2_1/bin/python3
> $ ll `which pip3`
> lrwxr-xr-x 1 mstep admin 39B 24 Mar 18:20 /usr/local/bin/pip3@ -> ../Cellar/pyt...@3.12/3.12.2_1/bin/pip3
>
> $ /usr/local/bin/python3 -m pip install pynvim
> error: externally-managed-environment
>
> $ brew install python3
> × This environment is externally managed
> ╰─> To install Python packages system-wide, try brew install
> xyz, where xyz is the package you are trying to
> install.
>
> If you wish to install a non-brew-packaged Python package,
> create a virtual environment using python3 -m venv path/to/venv.
> Then use path/to/venv/bin/python and path/to/venv/bin/pip.
>
> If you wish to install a non-brew packaged Python application,
> it may be easiest to use pipx install xyz, which will manage a
> virtual environment for you. Make sure you have pipx installed.
>
> note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
> hint: See PEP 668 for the detailed specification.
>
> Same error with:
> $ pip3 install pynvim
> $ pip3 install --upgrade pynvim
>
> I tried to copy the pynvim from python3.11 to python3.12 (don't shout on me!)
>
> $ cp -r python3.11/site-packages/pynvim python3.12/site-packages
> $ cp -r python3.11/site-packages/pynvim-0.5.0.dist-info python3.12/site-packages
>
> Ok! that means I have to create a virtual environment for python-packages!
> Where you suggest to put the python packages? What path to use for the virtualenv of python?
>
> I tried with:
>
> $ brew install pipx
> $ pipx install pynvim
> No apps associated with package pynvim or its dependencies. If you are attempting to install a library, pipx should
> not be used. Consider using pip or a similar tool instead.
>
> Please a little hint! I would be very grateful for any help
>
>
> marek
>
>
>
>
>
>
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/4e1f60e4-af0e-4f69-a2d7-e159f0013c49n%40googlegroups.com.


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/5166613D-059C-4D23-BA95-AF3DA7F63261%40googlemail.com.

Tuesday, March 26, 2024

Re: Help with pynvim for neovim needed

This mailing list is dedicated to Vim. If you use Neovim, use their official support channels.

On Tuesday, March 26, 2024 at 10:38:35 AM UTC+1 Enno wrote:
It is not clear what is to be achieved, but for Python support in Vim one should ensure that `!python3 -V`, and `:python3 import sys; print(sys.version)")` coincide. For Neovim, I'd refer to the experts at https://github.com/neovim/neovim/issues/

Le lundi 25 mars 2024 à 17:55:45 UTC+1, Marek Stepanek a écrit :
Hello all,


could some patient soul could help me out? I am at the point to give up.

macOS Sonoma 14.4 Intel (2018)

Homebrew newest upgrade

vimr 0.44.0

I am not Python coder (old school: Perl!). So forgive me my innocence. I suppose the modul pynvim should be installed outside of Homebrew?

First what is in my config-file?

~/.config/nvim/init.vim

let g:python3_host_prog='/usr/local/bin/python3'
let g:loaded_python_provider = 0
set pyxversion=3


In Vimr or Neovim :checkhelth I get:

## Python 3 provider (optional)

- INFO: Using: g:python3_host_prog = "/usr/local/bin/python3"
- INFO: Executable: /usr/local/bin/python3
- ERROR: Command error (job=20, exit code 1): `'/usr/local/bin/python3' -c 'import

stderr: Traceback (most recent call last): File "<string>", line 1, in <module>M
- INFO: Python version: 3.12.2
- INFO: pynvim version: unable to load neovim Python module
- ERROR: pynvim is not installed.

Error: unable to load neovim Python module
- ADVICE:

- Run in shell: /usr/local/bin/python3 -m pip install pynvim

But this advice to install with pip (or pip3) is meanwhile deprecated. My attempts to install it, little excerpt look like this:

$ which python
python not found

$ which python3
/usr/local/bin/python3
$ which pip3
/usr/local/bin/pip3

$ brew uninstall python3 # if I remember well with -force
$ brew install python3
$ ll `which python3`
lrwxr-xr-x 1 mstep admin 42B 24 Mar 18:20 /usr/local/bin/python3@ -> ../Cellar/pyt...@3.12/3.12.2_1/bin/python3
$ ll `which pip3`
lrwxr-xr-x 1 mstep admin 39B 24 Mar 18:20 /usr/local/bin/pip3@ -> ../Cellar/pyt...@3.12/3.12.2_1/bin/pip3

$ /usr/local/bin/python3 -m pip install pynvim
error: externally-managed-environment

$ brew install python3
× This environment is externally managed
╰─> To install Python packages system-wide, try brew install
xyz, where xyz is the package you are trying to
install.

If you wish to install a non-brew-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip.

If you wish to install a non-brew packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

Same error with:
$ pip3 install pynvim
$ pip3 install --upgrade pynvim

I tried to copy the pynvim from python3.11 to python3.12 (don't shout on me!)

$ cp -r python3.11/site-packages/pynvim python3.12/site-packages
$ cp -r python3.11/site-packages/pynvim-0.5.0.dist-info python3.12/site-packages

Ok! that means I have to create a virtual environment for python-packages!
Where you suggest to put the python packages? What path to use for the virtualenv of python?

I tried with:

$ brew install pipx
$ pipx install pynvim
No apps associated with package pynvim or its dependencies. If you are attempting to install a library, pipx should
not be used. Consider using pip or a similar tool instead.

Please a little hint! I would be very grateful for any help


marek






--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/0e4f6c7e-dd13-41fa-b9a6-2f8c64ab6646n%40googlegroups.com.

Re: Help with pynvim for neovim needed

It is not clear what is to be achieved, but for Python support in Vim one should ensure that `!python3 -V`, and `:python3 import sys; print(sys.version)")` coincide. For Neovim, I'd refer to the experts at https://github.com/neovim/neovim/issues/

Le lundi 25 mars 2024 à 17:55:45 UTC+1, Marek Stepanek a écrit :
Hello all,


could some patient soul could help me out? I am at the point to give up.

macOS Sonoma 14.4 Intel (2018)

Homebrew newest upgrade

vimr 0.44.0

I am not Python coder (old school: Perl!). So forgive me my innocence. I suppose the modul pynvim should be installed outside of Homebrew?

First what is in my config-file?

~/.config/nvim/init.vim

let g:python3_host_prog='/usr/local/bin/python3'
let g:loaded_python_provider = 0
set pyxversion=3


In Vimr or Neovim :checkhelth I get:

## Python 3 provider (optional)

- INFO: Using: g:python3_host_prog = "/usr/local/bin/python3"
- INFO: Executable: /usr/local/bin/python3
- ERROR: Command error (job=20, exit code 1): `'/usr/local/bin/python3' -c 'import

stderr: Traceback (most recent call last): File "<string>", line 1, in <module>M
- INFO: Python version: 3.12.2
- INFO: pynvim version: unable to load neovim Python module
- ERROR: pynvim is not installed.

Error: unable to load neovim Python module
- ADVICE:

- Run in shell: /usr/local/bin/python3 -m pip install pynvim

But this advice to install with pip (or pip3) is meanwhile deprecated. My attempts to install it, little excerpt look like this:

$ which python
python not found

$ which python3
/usr/local/bin/python3
$ which pip3
/usr/local/bin/pip3

$ brew uninstall python3 # if I remember well with -force
$ brew install python3
$ ll `which python3`
lrwxr-xr-x 1 mstep admin 42B 24 Mar 18:20 /usr/local/bin/python3@ -> ../Cellar/pyt...@3.12/3.12.2_1/bin/python3
$ ll `which pip3`
lrwxr-xr-x 1 mstep admin 39B 24 Mar 18:20 /usr/local/bin/pip3@ -> ../Cellar/pyt...@3.12/3.12.2_1/bin/pip3

$ /usr/local/bin/python3 -m pip install pynvim
error: externally-managed-environment

$ brew install python3
× This environment is externally managed
╰─> To install Python packages system-wide, try brew install
xyz, where xyz is the package you are trying to
install.

If you wish to install a non-brew-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip.

If you wish to install a non-brew packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

Same error with:
$ pip3 install pynvim
$ pip3 install --upgrade pynvim

I tried to copy the pynvim from python3.11 to python3.12 (don't shout on me!)

$ cp -r python3.11/site-packages/pynvim python3.12/site-packages
$ cp -r python3.11/site-packages/pynvim-0.5.0.dist-info python3.12/site-packages

Ok! that means I have to create a virtual environment for python-packages!
Where you suggest to put the python packages? What path to use for the virtualenv of python?

I tried with:

$ brew install pipx
$ pipx install pynvim
No apps associated with package pynvim or its dependencies. If you are attempting to install a library, pipx should
not be used. Consider using pip or a similar tool instead.

Please a little hint! I would be very grateful for any help


marek






--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/4e1f60e4-af0e-4f69-a2d7-e159f0013c49n%40googlegroups.com.

Monday, March 25, 2024

Help with pynvim for neovim needed

Hello all,


could some patient soul could help me out? I am at the point to give up.

macOS Sonoma 14.4 Intel (2018)

Homebrew newest upgrade

vimr 0.44.0

I am not Python coder (old school: Perl!). So forgive me my innocence. I suppose the modul pynvim should be installed outside of Homebrew?

First what is in my config-file?

~/.config/nvim/init.vim

let g:python3_host_prog='/usr/local/bin/python3'
let g:loaded_python_provider = 0
set pyxversion=3


In Vimr or Neovim :checkhelth I get:

## Python 3 provider (optional)

- INFO: Using: g:python3_host_prog = "/usr/local/bin/python3"
- INFO: Executable: /usr/local/bin/python3
- ERROR: Command error (job=20, exit code 1): `'/usr/local/bin/python3' -c 'import

stderr: Traceback (most recent call last): File "<string>", line 1, in <module>M
- INFO: Python version: 3.12.2
- INFO: pynvim version: unable to load neovim Python module
- ERROR: pynvim is not installed.

Error: unable to load neovim Python module
- ADVICE:

- Run in shell: /usr/local/bin/python3 -m pip install pynvim

But this advice to install with pip (or pip3) is meanwhile deprecated. My attempts to install it, little excerpt look like this:

$ which python
python not found

$ which python3
/usr/local/bin/python3
$ which pip3
/usr/local/bin/pip3

$ brew uninstall python3 # if I remember well with -force
$ brew install python3
$ ll `which python3`
lrwxr-xr-x 1 mstep admin 42B 24 Mar 18:20 /usr/local/bin/python3@ -> ../Cellar/python@3.12/3.12.2_1/bin/python3
$ ll `which pip3`
lrwxr-xr-x 1 mstep admin 39B 24 Mar 18:20 /usr/local/bin/pip3@ -> ../Cellar/python@3.12/3.12.2_1/bin/pip3

$ /usr/local/bin/python3 -m pip install pynvim
error: externally-managed-environment

$ brew install python3
× This environment is externally managed
╰─> To install Python packages system-wide, try brew install
xyz, where xyz is the package you are trying to
install.

If you wish to install a non-brew-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip.

If you wish to install a non-brew packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

Same error with:
$ pip3 install pynvim
$ pip3 install --upgrade pynvim

I tried to copy the pynvim from python3.11 to python3.12 (don't shout on me!)

$ cp -r python3.11/site-packages/pynvim python3.12/site-packages
$ cp -r python3.11/site-packages/pynvim-0.5.0.dist-info python3.12/site-packages

Ok! that means I have to create a virtual environment for python-packages!
Where you suggest to put the python packages? What path to use for the virtualenv of python?

I tried with:

$ brew install pipx
$ pipx install pynvim
No apps associated with package pynvim or its dependencies. If you are attempting to install a library, pipx should
not be used. Consider using pip or a similar tool instead.

Please a little hint! I would be very grateful for any help


marek






--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/9B85DBD0-C60D-4DA8-88C3-74749960BF70%40googlemail.com.

Saturday, March 23, 2024

Re: Nested Classes — thoughts and workarounds

Ooph! Thank you!!

I wish I knew about your libparser before I started down the regex jungle trying to parse the protobuf structure. I will finish this as a v1 with caveman regex then port to libparser for a v2.

SearchResponseResult is a good idea as well.

Thank you.


- Igbanam

On Sat, Mar 23, 2024 at 1:41 PM Lifepillar <lifepillar@lifepillar.me> wrote:
On 2024-03-22, Igbanam Ogbuluijah <xigbanam@gmail.com> wrote:
> Hello community,
>
> I've been playing with some idea which has brought me to needing Nested
> Classes in Vim. I am curious what you think about this? Would this be too
> much for Vimscript? If not, what current workarounds would you suggest?

I don't think Vim 9 script needs or would gain anything for such
extensions.

> Context: I'm taking a stab at parsing protobuf definitions into Vim 9
> classes. Nested messages in the protobuf demands
><https://arc.net/l/quote/qfcssecm> nested structs/classes.

Something like:

  message SearchResponse {
    message Result {
      string url = 1;
      string title = 2;
      repeated string snippets = 3;
    }
    repeated Result results = 1;
  }

becomes two classes/structs `SearchResponse` and `SearchResponse_Result`
in the target languages I've looked at. In Vim, you could do the same:

    interface Message
    endinterface

    class SearchResponseResult implements Message
      var url: string
      var title: string
      var snippets: list<string>
    endclass

    class SearchResponse implements Message
      var results: list<SearchResponseResult>
    endclass

That seems the most straightforward approach to me.

If you don't care about typing (but wouldn't that defeat the purpose of
protobuf?), you may simply use dictionaries, which can be arbitrarily
nested.

If your problem is parsing, libparser might help:

    https://github.com/lifepillar/vim-devel

Protobuf's grammar seems simple enough. You might even go fancy and
generate parsers from messages, which would be able to parse the
corresponding messages.

I don't see any reason to keep using Vim legacy script for new Vim
scripts.

Hope this helps,
Life.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/utmm5o%2412c1%241%40ciao.gmane.io.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAOmRJrdJvbou%3Di0k6iWePH_uvzfVBsf1Wkbt5Jc0s%2BRTkbNjqA%40mail.gmail.com.

Re: Nested Classes — thoughts and workarounds

On 2024-03-22, Igbanam Ogbuluijah <xigbanam@gmail.com> wrote:
> Hello community,
>
> I've been playing with some idea which has brought me to needing Nested
> Classes in Vim. I am curious what you think about this? Would this be too
> much for Vimscript? If not, what current workarounds would you suggest?

I don't think Vim 9 script needs or would gain anything for such
extensions.

> Context: I'm taking a stab at parsing protobuf definitions into Vim 9
> classes. Nested messages in the protobuf demands
><https://arc.net/l/quote/qfcssecm> nested structs/classes.

Something like:

message SearchResponse {
message Result {
string url = 1;
string title = 2;
repeated string snippets = 3;
}
repeated Result results = 1;
}

becomes two classes/structs `SearchResponse` and `SearchResponse_Result`
in the target languages I've looked at. In Vim, you could do the same:

interface Message
endinterface

class SearchResponseResult implements Message
var url: string
var title: string
var snippets: list<string>
endclass

class SearchResponse implements Message
var results: list<SearchResponseResult>
endclass

That seems the most straightforward approach to me.

If you don't care about typing (but wouldn't that defeat the purpose of
protobuf?), you may simply use dictionaries, which can be arbitrarily
nested.

If your problem is parsing, libparser might help:

https://github.com/lifepillar/vim-devel

Protobuf's grammar seems simple enough. You might even go fancy and
generate parsers from messages, which would be able to parse the
corresponding messages.

I don't see any reason to keep using Vim legacy script for new Vim
scripts.

Hope this helps,
Life.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/utmm5o%2412c1%241%40ciao.gmane.io.

Thursday, March 21, 2024

Nested Classes — thoughts and workarounds

Hello community,

I've been playing with some idea which has brought me to needing Nested Classes in Vim. I am curious what you think about this? Would this be too much for Vimscript? If not, what current workarounds would you suggest?

Context: I'm taking a stab at parsing protobuf definitions into Vim 9 classes. Nested messages in the protobuf demands nested structs/classes. 

Constraints:
  • (strong) All code-gen must be in vim9script; else how would the language gain popularity?
  • (weak) All definitions should be in one file
Current workarounds
  1. Regress into old VimL and use functions as classes. Then define internal "structures" as internal functions.
  2. Create a directory where each file is a top-level message class
  3. (current winner) Flatten the nesting, but only export top-level messages
What do you think? How can I approach this better?

Best,
Igbanam

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAOmRJrd9ga0nGchBL%2BKD%3Dp0SWNVj8DtUH_sxuXXFtO-m%3DwVHMQ%40mail.gmail.com.

Saturday, March 16, 2024

Re: Tweaking syntax highlighting

On Fri, 15 Mar 2024 at 17:59, Christian Brabandt <cblists@256bit.org> wrote:
>
>
> On Fr, 15 Mär 2024, A. Wik wrote:
>
> > I have:
> > colorscheme blue
> > set background=dark
> > hi Error guifg=darkgrey guibg=lightred gui=underline
> > \ ctermfg=darkgrey ctermbg=lightred
> > in my .vimrc
> >
> > Normally, errors are highlighted in lightred foreground on lightred
> > background, which is, of course, unreadable. Hence the "hi ..."
> > statement in the .vimrc.
> >
> > The problem is that the "hi ..." doesn't seem to work if run from
> > .vimrc, but it works when I run this manually:
> > :hi Error ctermfg=darkgrey ctermbg=lightred
>
> What exactly do you mean with "doesn't seem to work" ? What does :hi
> Error show? Or even :verbose :hi Error
>

After starting up the editor and setting "verbose" to 5, ":hi Error"
reports the following:
Error xxx term=reverse ctermfg=12 ctermbg=12 gui=underline guifg=red
guibg=darkBlue
Last set from c:\prg\vim73\colors\blue.vim

"blue.vim" has the following statement:
hi Error guifg=red guibg=darkBlue gui=underline ctermfg=red

-Albert.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CALPW7mR%2BDegQ35Xj4ujLAauUBzDsUEjSryDwUYfxaP1eO9uwaw%40mail.gmail.com.

Friday, March 15, 2024

Re: Tweaking syntax highlighting

On Fr, 15 Mär 2024, A. Wik wrote:

> I have:
> colorscheme blue
> set background=dark
> hi Error guifg=darkgrey guibg=lightred gui=underline
> \ ctermfg=darkgrey ctermbg=lightred
> in my .vimrc
>
> Normally, errors are highlighted in lightred foreground on lightred
> background, which is, of course, unreadable. Hence the "hi ..."
> statement in the .vimrc.
>
> The problem is that the "hi ..." doesn't seem to work if run from
> .vimrc, but it works when I run this manually:
> :hi Error ctermfg=darkgrey ctermbg=lightred

What exactly do you mean with "doesn't seem to work" ? What does :hi
Error show? Or even :verbose :hi Error

Thanks,
Christian
--
The bigger the theory the better.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/ZfSMbj2PjUIAbLlR%40256bit.org.

Tweaking syntax highlighting

Hi all,

I have:
colorscheme blue
set background=dark
hi Error guifg=darkgrey guibg=lightred gui=underline
\ ctermfg=darkgrey ctermbg=lightred
in my .vimrc

Normally, errors are highlighted in lightred foreground on lightred
background, which is, of course, unreadable. Hence the "hi ..."
statement in the .vimrc.

The problem is that the "hi ..." doesn't seem to work if run from
.vimrc, but it works when I run this manually:
:hi Error ctermfg=darkgrey ctermbg=lightred

Am I doing something wrong here?

Regards,
Albert Wik.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CALPW7mS%2Br7tdr6XDWabRhXivPh168R4JYOYWjXOAn%3DdMQmnzew%40mail.gmail.com.

Re: Problems with the plugin description



пт, 15 мар. 2024 г., 09:52 Heiko Schröder <heikos@online.de>:

Dear list,

I consulted the description posted in vim/runtime/doc/repeat.txt on github very carefully.  I wanted to install the calendar-vim script which was originally designed (last version) for vim7.2.  I now use vim 9.0. 

I created a directory ~/.vim/pack/calendar/start and unpacked calendar-vim.zip there which creates the usual autoload/ doc/ and plugin/ directories there. 

It was said, that vim searches for the plugins in the start-directory after looking in the .vimrc. 

It should load automatically.  But nothing happens. 


Is there any kind of stupid mistake of mine?

Thanks a lot!

Best regards!

Heiko Schroeder, Ahrensburg, Germany

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/f15b9bb0-bdfb-406f-91eb-eec073e8a731%40online.de.

Hello,

Probably, you weren't really careful while reading the docs. The proper path should have the form pack/manager-name/start/plugin-name/, where both "manager-name" and "plugin-name" are arbitrary.

The purpose of "manager-name" subdirectory is to prevent conflicts between different plugin managers and/or manual plugin installations.

This is documented under `:help packages` topic in Vim's help.

Kind regards,
Matvey

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAFsTB%2B%2Ba5OWxe8Svasz5u64J9UQoAnEh0G5Ue-A-R5%3DBg7H6AA%40mail.gmail.com.

Re: Problems with the plugin description

On Mi, 13 Mär 2024, Heiko Schröder wrote:

> Dear list,
>
> I consulted the description posted in vim/runtime/doc/repeat.txt on
> github very carefully.  I wanted to install the calendar-vim script
> which was originally designed (last version) for vim7.2.  I now use vim
> 9.0.
>
> I created a directory ~/.vim/pack/calendar/start and unpacked
> calendar-vim.zip there which creates the usual autoload/ doc/ and
> plugin/ directories there.

You are missing a directory.

You should create a directory (let's call it calendar) below
~/.vim/pack/<name>/start/

So you would run the following commands:
mkdir -p ~/.vim/pack/dist/start/calendar &&
git clone git clone git://github.com/mattn/calendar-vim git clone
git://github.com/mattn/calendar-vim

Then restart Vim and you have the :Calendar ex command available.

Thanks,
Christian
--
"The one charm of marriage is that it makes a life of deception a necessity."
-- Oscar Wilde

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/ZfP2cBUN25hs/E6E%40256bit.org.

Wednesday, March 13, 2024

Problems with the plugin description

Dear list,

I consulted the description posted in vim/runtime/doc/repeat.txt on github very carefully.  I wanted to install the calendar-vim script which was originally designed (last version) for vim7.2.  I now use vim 9.0. 

I created a directory ~/.vim/pack/calendar/start and unpacked calendar-vim.zip there which creates the usual autoload/ doc/ and plugin/ directories there. 

It was said, that vim searches for the plugins in the start-directory after looking in the .vimrc. 

It should load automatically.  But nothing happens. 


Is there any kind of stupid mistake of mine?

Thanks a lot!

Best regards!

Heiko Schroeder, Ahrensburg, Germany

Tuesday, March 12, 2024

Re: Registration Payments

On Mo, 11 Mär 2024, Trev wrote:

> Hello,
>
> I regret to inform you all that since Bram's passing, I had never
> updated my registration fee payments in PayPal. I have made months of
> payments to register@moolenaar.net. Not only are my payments perhaps
> piling up where they are not helpful, but I am missing out on valuable
> contributor clout! I honestly can't recall the last time I was sent a
> registration "key" and my amount "contributed" does not match the number
> I've actually donated.
>
> I hope you can recover the donations. What should I do from here?

Just wanted you all know, I am taking this off-list and checking with
Trey and the ICCF directly.

Thanks,
Christian
--
The best way to preserve a right is to exercise it, and the right to
smoke is a right worth dying for.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/Ze//S9eazWT%2Bsr0t%40256bit.org.

Monday, March 11, 2024

Registration Payments

Hello,

I regret to inform you all that since Bram's passing, I had never
updated my registration fee payments in PayPal. I have made months of
payments to register@moolenaar.net. Not only are my payments perhaps
piling up where they are not helpful, but I am missing out on valuable
contributor clout! I honestly can't recall the last time I was sent a
registration "key" and my amount "contributed" does not match the number
I've actually donated.

I hope you can recover the donations. What should I do from here?

--

Trev : 0FB7 D06B 4A2A F07E AD5B 1169 183B 6306 8AA1 D206

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CZRCC4I15IM9.3BN8F9L7TBZ09%40trevdev.ca.

Friday, March 8, 2024

Re: fancy config editing with vim for json?



Am Fr., 8. März 2024 um 12:39 Uhr schrieb Alessandro Antonello <antonello.ale@gmail.com>:
Hi, Sebastian.

If you don't mind to install NodeJS, you can try CoC (https://github.com/neoclide/coc.nvim). It has a lot of plugins to several different languages and one can port plugins that work with VSCode to work with CoC. In fact, I use the 'coc-json' plugin that does just that: get a JSON schema and pop the completion for you. There is a little bit of configuration though.

Regards.

Yeah, that's great. Exactly what i mean. Thanks
Regards Sebastian

 

Em sex., 8 de mar. de 2024 às 03:57, 'Sebastian Gödecke' via vim_use <vim_use@googlegroups.com> escreveu:


Am Do., 7. März 2024 um 13:59 Uhr schrieb Christian Brabandt <cblists@256bit.org>:
Hi,
I am not sure what exactly you want and what you mean with loading the
schema and setting the options for auto complete. I guess you may want
to look at the following plugin however. https://github.com/Quramy/vison


Ah okay, i take a look at this. 

But what i mean is this here:
It's for VSCode. When editing the config-file from meshcentral, there will be all options for meshcentral with an explanation for the options, autocomplete etc. 

I thought, something similar will be available for vim. 

Regards Sebastian

 
Thanks,
Chris

On Do, 07 Mär 2024, 'Sebastian Gödecke' via vim_use wrote:

> Ping....
> is there another way to get this behavior?
> Regards Sebastian
>
> Am Mo., 29. Jan. 2024 um 15:02 Uhr schrieb Sebastian Gödecke <
> simpsonetti@googlemail.com>:
>
> > Hi there,
> > is there a way to load a schema for json in vim and then have the right
> > options in autocomplete?
> >
> > Thanks in advance.
> >

Mit freundlichen Grüßen
Christian
--
Telling the truth to people who misunderstand you is generally promoting
a falsehood, isn't it?
                -- A. Hope

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/Zem6RtT8Gwm95A5/%40256bit.org.


--
Mit freundlichen Grüßen
Sebastian Gödecke

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAJRNCbbM86Dve6FQpoWhqD8w5VfA0UGvOZiqEQgmcugu21m%3Dqw%40mail.gmail.com.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CA%2BJN8RK%2BBkuhXErD8RwkPK%2BuJ1u27f4GNpqFG0%3DnbpVCXbayMg%40mail.gmail.com.


--
Mit freundlichen Grüßen
Sebastian Gödecke

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAJRNCbbBEcGPdYN4aNGv5L99obMZz9okO%3DEqCenCrJgHGYv_Fw%40mail.gmail.com.

Re: fancy config editing with vim for json?

Hi, Sebastian.

If you don't mind to install NodeJS, you can try CoC (https://github.com/neoclide/coc.nvim). It has a lot of plugins to several different languages and one can port plugins that work with VSCode to work with CoC. In fact, I use the 'coc-json' plugin that does just that: get a JSON schema and pop the completion for you. There is a little bit of configuration though.

Regards.

Em sex., 8 de mar. de 2024 às 03:57, 'Sebastian Gödecke' via vim_use <vim_use@googlegroups.com> escreveu:


Am Do., 7. März 2024 um 13:59 Uhr schrieb Christian Brabandt <cblists@256bit.org>:
Hi,
I am not sure what exactly you want and what you mean with loading the
schema and setting the options for auto complete. I guess you may want
to look at the following plugin however. https://github.com/Quramy/vison


Ah okay, i take a look at this. 

But what i mean is this here:
It's for VSCode. When editing the config-file from meshcentral, there will be all options for meshcentral with an explanation for the options, autocomplete etc. 

I thought, something similar will be available for vim. 

Regards Sebastian

 
Thanks,
Chris

On Do, 07 Mär 2024, 'Sebastian Gödecke' via vim_use wrote:

> Ping....
> is there another way to get this behavior?
> Regards Sebastian
>
> Am Mo., 29. Jan. 2024 um 15:02 Uhr schrieb Sebastian Gödecke <
> simpsonetti@googlemail.com>:
>
> > Hi there,
> > is there a way to load a schema for json in vim and then have the right
> > options in autocomplete?
> >
> > Thanks in advance.
> >

Mit freundlichen Grüßen
Christian
--
Telling the truth to people who misunderstand you is generally promoting
a falsehood, isn't it?
                -- A. Hope

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/Zem6RtT8Gwm95A5/%40256bit.org.


--
Mit freundlichen Grüßen
Sebastian Gödecke

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAJRNCbbM86Dve6FQpoWhqD8w5VfA0UGvOZiqEQgmcugu21m%3Dqw%40mail.gmail.com.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CA%2BJN8RK%2BBkuhXErD8RwkPK%2BuJ1u27f4GNpqFG0%3DnbpVCXbayMg%40mail.gmail.com.

Thursday, March 7, 2024

Re: fancy config editing with vim for json?



Am Do., 7. März 2024 um 13:59 Uhr schrieb Christian Brabandt <cblists@256bit.org>:
Hi,
I am not sure what exactly you want and what you mean with loading the
schema and setting the options for auto complete. I guess you may want
to look at the following plugin however. https://github.com/Quramy/vison


Ah okay, i take a look at this. 

But what i mean is this here:
It's for VSCode. When editing the config-file from meshcentral, there will be all options for meshcentral with an explanation for the options, autocomplete etc. 

I thought, something similar will be available for vim. 

Regards Sebastian

 
Thanks,
Chris

On Do, 07 Mär 2024, 'Sebastian Gödecke' via vim_use wrote:

> Ping....
> is there another way to get this behavior?
> Regards Sebastian
>
> Am Mo., 29. Jan. 2024 um 15:02 Uhr schrieb Sebastian Gödecke <
> simpsonetti@googlemail.com>:
>
> > Hi there,
> > is there a way to load a schema for json in vim and then have the right
> > options in autocomplete?
> >
> > Thanks in advance.
> >

Mit freundlichen Grüßen
Christian
--
Telling the truth to people who misunderstand you is generally promoting
a falsehood, isn't it?
                -- A. Hope

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/Zem6RtT8Gwm95A5/%40256bit.org.


--
Mit freundlichen Grüßen
Sebastian Gödecke

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAJRNCbbM86Dve6FQpoWhqD8w5VfA0UGvOZiqEQgmcugu21m%3Dqw%40mail.gmail.com.

Re: fancy config editing with vim for json?

Hi,
I am not sure what exactly you want and what you mean with loading the
schema and setting the options for auto complete. I guess you may want
to look at the following plugin however. https://github.com/Quramy/vison

Thanks,
Chris

On Do, 07 Mär 2024, 'Sebastian Gödecke' via vim_use wrote:

> Ping....
> is there another way to get this behavior?
> Regards Sebastian
>
> Am Mo., 29. Jan. 2024 um 15:02 Uhr schrieb Sebastian Gödecke <
> simpsonetti@googlemail.com>:
>
> > Hi there,
> > is there a way to load a schema for json in vim and then have the right
> > options in autocomplete?
> >
> > Thanks in advance.
> >

Mit freundlichen Grüßen
Christian
--
Telling the truth to people who misunderstand you is generally promoting
a falsehood, isn't it?
-- A. Hope

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/Zem6RtT8Gwm95A5/%40256bit.org.

Re: fancy config editing with vim for json?

Ping....
is there another way to get this behavior?
Regards Sebastian

Am Mo., 29. Jan. 2024 um 15:02 Uhr schrieb Sebastian Gödecke <simpsonetti@googlemail.com>:
Hi there, 
is there a way to load a schema for json in vim and then have the right options in autocomplete?

Thanks in advance. 

--
Mit freundlichen Grüßen
Sebastian Gödecke


--
Mit freundlichen Grüßen
Sebastian Gödecke

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAJRNCbaGLoYfV7kNHeCHyAMJjFDUxSuNhcQndQJ8S090s42pXA%40mail.gmail.com.

Wednesday, March 6, 2024

Why I cannot map key after 'f' or 't' commands?

In normal mode '<esc>' typed after 'f' cannot be mapped. I'd like to remove some highlighting in my plugin but it seems Vim simply exits the 'motion pending' mode ignoring mappings for normal mode. So I have to type <esc> twice, the second of which is mapped. Any way to work around this?

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/60f9e579-5480-4364-a531-259cdc9aee22n%40googlegroups.com.

clientserver with sockets?

I read here that you can use a socket do clientserver functionality but I can't figure out where the socket is;

Is it a file socket in the file system like mysql used to use?

Is it a tcp socket?

I don't see it mentioned anywhere in the remote.txt help file.

The reason I ask is that I'm using WSL2 and I can't seem to get a list of servers with `vim --serverlist` even though I have a vim server running.

Thank you,
   helpdeskaleer


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAEJF0%2B00YeqD1mdU%3DYJUbUuTxUAo3G2dGaYSaAv53FhWOLKAyw%40mail.gmail.com.

Re: Problem highlighting cword in help buffer (Text format)

Shouldn't the save of the iskeyword be part of the auto command? It might be easier to maintain if you convert it to a function and just call that from the auto command because you won't be forced to have everything on one long line. 

Salman

On Tue, Mar 5, 2024, 09:26 'lijh8' via vim_use <vim_use@googlegroups.com> wrote:
Hi Salman,

I update this to highlight cursor word, it now works in `:help` system and it also works to the built-in star `*` .

Thanks

```
let save_isk=&amp;iskeyword | set iskeyword=@,48-57,_,192-255 | autocmd CursorMoved,CursorMovedI * execute 'match Visual' (getline('.')[col('.')-1] =~# '\w' ? '/\&lt;' . escape(expand('<cword>'), '/\.*$^~[]') . '\&gt;/' : '//') | let &amp;iskeyword=save_isk
```</cword>

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/tencent_ACEA18DFC679933C79DCB1CF4376F93EC108%40qq.com.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CANuxnEfKhxnxESSFvTBM9-juLXSbeYkefFcf1Hw8arAq_XLzmA%40mail.gmail.com.

Tuesday, March 5, 2024

Re: Problem highlighting cword in help buffer (Text format)

Hi Salman,

I update this to highlight cursor word, it now works in `:help` system and it also works to the built-in star `*` .

Thanks

```
let save_isk=&amp;iskeyword | set iskeyword=@,48-57,_,192-255 | autocmd CursorMoved,CursorMovedI * execute 'match Visual' (getline('.')[col('.')-1] =~# '\w' ? '/\&lt;' . escape(expand('<cword>'), '/\.*$^~[]') . '\&gt;/' : '//') | let &amp;iskeyword=save_isk
```</cword>

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/tencent_ACEA18DFC679933C79DCB1CF4376F93EC108%40qq.com.

Re: Problem highlighting cword in help buffer (Text format)

I think the 'iskeyword' option controls the characters that are seen as part of a word. For example, if it contains '-', then my-text is seen as one word and as two words if it doesn't contain the hyphen. 

In your case, try ':verb set iskeyword?' to both see its value and where it was set. 

Salman

On Tue, Mar 5, 2024, 01:48 'lijh8' via vim_use <vim_use@googlegroups.com> wrote:
Hi community,

I use this to highlight occurrences of the word when cursor is inside
the word, and cancel the highlight when cursor is outside.

```
autocmd CursorMoved,CursorMovedI * execute 'match Visual' (getline('.')[col('.')-1] =~# '\w' ? '/\&lt;' . escape(expand('<cword>'), '/\.*$^~[]') . '\&gt;/' : '//')
```

When i `:help autocmd` and read lines like these:

` autocmd_add({replace: `
` autocmd_add(#{replace: `

(backticks are not part of them)

if I place cursor on ` autocmd_add ` or ` replace `,
this whole string ` autocmd_add({replace: ` is highlighted as a whole
wrongly, and this is wrong too ` autocmd_add(#{replace: `.

But when I open the file directly with vim:
` $ vi /usr/share/vim/vim90/doc/autocmd.txt `
` autocmd_add ` and ` replace ` are not highlighted together as a whole.

it seems that the pattern does not count ` ( `, ` # `, ` { ` as boundary
of words in ` :help ` buffer. how can I fix it?

Thanks!</cword>

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/tencent_3174790CB14343CFF9B4C1411891C65F9308%40qq.com.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CANuxnEeeLazHRz034eh5hUdBYiDxbt_888p8_%3DYkedSWybmPVQ%40mail.gmail.com.