dvdsk / prosesitter.nvim

A (work in progress) grammar, spelling and style plugin for Neovim
MIT License
25 stars 0 forks source link

backend install crashing with indent-blankline installed #53

Open prashantjoge opened 2 years ago

prashantjoge commented 2 years ago

This is my prosesetter.lua file

require("telescope").load_extension("prosesitter") -- Optionally, depends on telescope.nvim
require("prosesitter"):setup({
    vale_bin = vim.fn.stdpath("data") .. "/user/bin/vale",
    vale_cfg = vim.fn.stdpath("data") .. "$HOME/.config/vale/.vale.ini",
    --optional extra queries overrides existing queries
    queries = {
        -- see the piece on adding queries on how to use this
        -- (not needed if using an out of the box supported language
        py = {
            strings = "[(string) ] @capture",
            comments = "[(comment)+ ] @capture",
        },
    },
    -- highlight groups to use for lint errors, warnings and suggestions
    severity_to_hl = { error = "SpellBad", warning = "SpellRare", suggestion = "SpellCap" },
    -- weather to lint strings, comments or both for a language
    lint_targets = { py = "both", tex = "strings", sh = "comments" },
    disabled_ext = { "tex" }, -- do not ever lint tex files
    auto_enable = false, -- do not start linting files on open (default = true)
    default_cmds = false, -- do not add commands (default = true)
})

I am getting the following error

Language tool not installed, install language tool? y/n: yError detected while processing /home/aaron/.dotfiles/nvim/.config/nvim/init.lua:
E5113: Error while calling lua chunk: ...ck/packer/start/impatient.nvim/lua/impatient/profile.lua:146: ...e/pack/packer/start/prosesitter/lua/prosesitter/util.
lua:16: Vim:E492: Not an editor command: IndentBlanklineRefresh

The language tool is already installed but it will still ask to be installed. Neverthless....

dvdsk commented 2 years ago

Thanks for trying out my plugin! I see the auto installer is giving you a bit of a problem. I recently worked on that, I have merged those changes. Could you try updating the plugin and see what happens?

Also can you check if you are using neovim 0.6 (neovim --version)?

The language tool is already installed but it will still ask to be installed.

I will make it possible to use your own install in the future once I get all bugs ironed out.

prashantjoge commented 2 years ago

I am not sure how to update the plugin. I use lunarvim. So I disabled and enabled the plugin. Assuming it takes the latest from the repo. Please find everything related to my nvim install . nvim -v, and :checkhealth. By the way I still get the same error

NVIM v0.6.1
Build type: Release
LuaJIT 2.0.5
Compiled by builduser

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

null-ls: require("null-ls.health").check()

nvim: health#nvim#check

Configuration

Performance

Remote Plugins

terminal

nvim-lsp-installer: require("nvim-lsp-installer.health").check()

nvim-lsp-installer report

nvim-treesitter: require("nvim-treesitter.health").check()

Installation

Parser/Features H L F I J

provider: health#provider#check

Clipboard (optional)

Python 2 provider (optional)

Python 3 provider (optional)

Python virtualenv

Ruby provider (optional)

Node.js provider (optional)

Perl provider (optional)

telescope: require("telescope.health").check()

Checking for required plugins

Checking external dependencies

===== Installed extensions =====

Telescope Extension: media_files

Telescope Extension: projects

Telescope Extension: prosesitter

vim.lsp: require("vim.lsp.health").check()

vim.treesitter: require("vim.treesitter.health").check()

which_key: health#which_key#check

WhichKey: checking conflicting keymaps

dvdsk commented 2 years ago

It seems lunarvim uses Packer. You can use :PackerSync to update. I do not think Enabling and disabling will do anything as the old files stay cached.

prashantjoge commented 2 years ago

It seems lunarvim uses Packer. You can use :PackerSync to update. I do not think Enabling and disabling will do anything as the old files stay cached.

I tried that.... didn't seem to make a difference

Language tool not installed, install language tool? y/n: yError detected while processing /home/aaron/.dotfiles/nvim/.config/nvim/init.lua:
E5113: Error while calling lua chunk: ...ck/packer/start/impatient.nvim/lua/impatient/profile.lua:146: ...e/pack/packer/start/prosesitter/lua/prosesitter/util.
lua:16: Vim:E492: Not an editor command: IndentBlanklineRefresh
stack traceback:
        [C]: in function 'error'
        ...ck/packer/start/impatient.nvim/lua/impatient/profile.lua:146: in function 'require'
        /home/aaron/.config/nvim/init.lua:25: in main chunk

Didn't know about packersync. so I learned something new. Thanks :)

dvdsk commented 2 years ago

Took some time for me to come back to this, it is quite a strange error. It looks like you have the indent-blanklines (https://github.com/lukas-reineke/indent-blankline.nvim) plugin installed.

When my plugin tries to open a new neovim split to display install progress an autocommand issues the IndentBlankLineRefresh command from the indent-blanklines plugin. For some reason it is not available in your neovim instance when my plugin runs.

Could you keep my plugin removed and check if you can call the command IndentBlanklineRefresh? (just type :IndentBlanklineRefresh in normal mode). Please let me know if you get an error or not.