Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directory path starting with number causes error #239

Open
PerMalmberg opened this issue Jun 11, 2024 · 1 comment
Open

Directory path starting with number causes error #239

PerMalmberg opened this issue Jun 11, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@PerMalmberg
Copy link

PerMalmberg commented Jun 11, 2024

Hi,

Just want to preface this bug report with a huge "thank you" for making this plugin.

Bug description
On Windows (shell is pwsh) and on startup, when a project is placed in a folder named 02-breaking the following error occurs. It appears a path that is begins with numbers is interpreted as as a back reference regex?

Error detected while processing C:\Users\perma\AppData\Local\nvim\init.lua:
E65: Illegal back reference
Failed to run `config` for cmake-tools.nvim

...nvim-data/lazy/cmake-tools.nvim/lua/cmake-tools/init.lua:1268: Failed to set autocmd

# stacktrace:
  - cmake-tools.nvim\lua\cmake-tools\init.lua:1268 _in_ **create_regenerate_on_save_autocmd**
  - cmake-tools.nvim\lua\cmake-tools\init.lua:1295 _in_ **register_autocmd**
  - cmake-tools.nvim\lua\cmake-tools\init.lua:54 _in_ **setup**
  - ~/AppData/Local/nvim/lua/plugins/cmake-tools.lua:10 _in_ **config**
  - LazyVim\lua\lazyvim\plugins\extras\lang\cmake.lua:51 _in_ **check**
  - LazyVim\lua\lazyvim\plugins\extras\lang\cmake.lua:55 _in_ **init**
  - ~\AppData\Local\nvim/lua/config/lazy.lua:10
  - ~\AppData\Local\nvim\init.lua:12

Steps to reproduce

Minimal configuration My appologies, I'm just starting out with nvim based on lazynvim so I don't know how to load only `cmake-tools`. My entire config can be found here, if needed: https:/PerMalmberg/nvim-config

Just open a project (MRP attached) with cmake-tools enabled and the error occurs.

I've tried vim.opt.shellslash = true, but that makes no difference.

Expected behavior
Paths starting with numbers to be handled.

Environment

  • OS: Windows 11, pwsh
  • Plugins commit hash: 09bd614

Contents in the *cmake-tools* buffer

Sorry, which buffer is this? How do I access it?

20-breaking.zip

@PerMalmberg PerMalmberg added the bug Something isn't working label Jun 11, 2024
@PerMalmberg PerMalmberg changed the title Directory path causes error Directory path starting with number causes error Jun 12, 2024
@WayenVan
Copy link

WayenVan commented Oct 1, 2024

Same on windows, my user name start with number so this error occurs everywhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants