Make :TSInstall work in Nix by adding a second module installation target (#473)

* Ignore tags file in project root

* Make :TSInstall work with Nix

This commit adds logic to determine where to install parsers, meaning
the *.so files. Until now the package path of the nvim-treesitter plugin
was used. But when installed with Nix, the plugin lands in "/nix/store",
which is read-only.

With this commit $XDG_DATA_HOME/nvim/site/parser/*.go will be used as
the parser installation path. The directory will be created if it
doesn't exist.

* Add generate_join function

The generate_join function is used to create two other functions, one
to join path segments, the other to join strings with a space for error
messages.
This commit is contained in:
Florian Beeres 2020-09-18 09:44:07 +02:00 committed by GitHub
parent b2e1ea1edf
commit 18adc9e176
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 79 additions and 13 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
doc/tags
.luacheckcache
/tags