nx.nvim
nx.nvim copied to clipboard
all telescope windows empty using lunarvim
Describe the bug When I try to run any action / generator inside lunarvim the telescopes windows are empty and commands to dont work.
To Reproduce Steps to reproduce the behavior:
- Create a new nx repo with an application
- Install extension inside lunarvim using packer
- Run
:Telescope nx generators-> empty window shows up - type in anything and hit enter -> error displayed
E5108: Error executing lua ...arvim/site/pack/lazy/opt/nx.nvim/lua/nx/multirunners.lua:124: attempt to index a nil value
stack traceback:
...arvim/site/pack/lazy/opt/nx.nvim/lua/nx/multirunners.lua:124: in function 'run_replace_or_original'
...ack/lazy/opt/telescope.nvim/lua/telescope/actions/mt.lua:65: in function 'key_func'
.../pack/lazy/opt/telescope.nvim/lua/telescope/mappings.lua:350: in function 'execute_keymap'
[string ":lua"]:1: in main chunk
Expected behavior Available generators beeing displayed
Screenshots
Desktop (please complete the following information):
- OS: [WSL Ubuntu 20.04]
- Version: [Commit c4d2243]
- lunarvim: [1.3]
- neovim: [0.9]
Additional context config.lua
lvim.plugins = {
...
{
'Equilibris/nx.nvim',
dependencies = {
'nvim-telescope/telescope.nvim',
},
config = function()
require("nx").setup {}
end
}
}
nx is installed globaly using npm and the command is working inside my terminal.
This is a piece of the nx.log file:
[2023-10-03 20:37:52 LOG] ===================================
[2023-10-03 20:37:52 LOG] ========== Setting up NX ==========
[2023-10-03 20:37:52 LOG] ===================================
[2023-10-03 20:37:52 LOG] {
["projects"] = {
},
["graph_file_name"] = /tmp/lvim.jan/VCuqH9/0.json,
["log"] = [2023-10-03 20:37:52 LOG] ===================================
[2023-10-03 20:37:52 LOG] ========== Setting up NX ==========
[2023-10-03 20:37:52 LOG] ===================================
,
["command_runner"] = function: 0x7f8cd9ce18f8,
["nx_cmd_root"] = nx,
["cache"] = {
["targets"] = {
},
["actions"] = {
},
},
["form_renderer"] = function: 0x7f8cd9ca94d8,
["generators"] = {
["external"] = {
},
["workspace"] = {
},
},
}
[2023-10-03 20:37:52 LOG] Starting reading
[2023-10-03 20:37:52 LOG] ----------------
[2023-10-03 20:37:52 LOG] Reading ./nx.json
[2023-10-03 20:37:52 LOG] Read nx.json completed.
[2023-10-03 20:53:45 LOG] ===================================
[2023-10-03 20:53:45 LOG] ========== Setting up NX ==========
[2023-10-03 20:53:45 LOG] ===================================
[2023-10-03 20:53:45 LOG] {
["log"] = [2023-10-03 20:53:45 LOG] ===================================
[2023-10-03 20:53:45 LOG] ========== Setting up NX ==========
[2023-10-03 20:53:45 LOG] ===================================
,
["cache"] = {
["targets"] = {
},
["actions"] = {
},
},
["generators"] = {
["external"] = {
},
["workspace"] = {
},
},
["nx_cmd_root"] = nx,
["graph_file_name"] = /tmp/lvim.jan/5AS3Qc/0.json,
["form_renderer"] = function: 0x7fb655509b60,
["projects"] = {
},
["command_runner"] = function: 0x7fb655502088,
}
[2023-10-03 20:53:45 LOG] Starting reading
[2023-10-03 20:53:45 LOG] ----------------
[2023-10-03 20:53:45 LOG] Reading ./nx.json
[2023-10-03 20:53:45 LOG] Read nx.json completed.
I added this code to my init.lua ( inside .config/nvim ):
require('nx').setup({nx_cmd_root='nx'})
This solved the problem for me: ;)