josa42 / coc-sh

SH language server extension using bash-language-server for coc.nvim.
MIT License
209 stars 4 forks source link

Please add a rename provider #67

Closed martin-braun closed 1 year ago

martin-braun commented 2 years ago

I was installing this plugin in the hope to refactor variables in bash scripts, but it fails:

2022-11-03T05:11:18.756 INFO (pid:83223) [services] - LanguageClient bash-language-server state change: stopped => starting
2022-11-03T05:11:18.772 INFO (pid:83223) [language-client-index] - Language server "sh" started with 84503
2022-11-03T05:11:19.110 INFO (pid:83223) [attach] - receive notification: highlight []
2022-11-03T05:11:20.335 INFO (pid:83223) [attach] - receive notification: highlight []
2022-11-03T05:11:20.543 INFO (pid:83223) [services] - LanguageClient bash-language-server state change: starting => running
2022-11-03T05:11:20.544 INFO (pid:83223) [services] - service sh started
2022-11-03T05:11:21.852 INFO (pid:83223) [attach] - receive notification: rename []
2022-11-03T05:11:21.855 ERROR (pid:83223) [node-client] - Error on notification "rename": rename provider not found for current buffer, your language server doesn't support it. Error
    at eP.echoError (~/.local/share/nvim/site/pack/packer/start/coc.nvim/build/index.js:22:1869)
    at eP.<anonymous> (~/.local/share/nvim/site/pack/packer/start/coc.nvim/build/index.js:291:22439)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2022-11-03T05:11:21.855 ERROR (pid:83223) [attach] - Error: rename provider not found for current buffer, your language server doesn't support it.
    at Ey.checkProvier (~/.local/share/nvim/site/pack/packer/start/coc.nvim/build/index.js:291:8808)
    at py.rename (~/.local/share/nvim/site/pack/packer/start/coc.nvim/build/index.js:287:8285)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Ry.cocAction (~/.local/share/nvim/site/pack/packer/start/coc.nvim/build/index.js:291:20893)
    at async eP.<anonymous> (~/.local/share/nvim/site/pack/packer/start/coc.nvim/build/index.js:291:22402)
Andrew15-5 commented 1 year ago

I'm also interested in this feature. Every time instead I have to <C-n> select every occurrence of a variable and batch rename it with multi cursor plugin.

thi-marques commented 1 year ago

It seems that bash-language-server community is already working on that.

See more on #161

martin-braun commented 1 year ago

@thi-marques That's awesome, CoC plugins are more accessible than LSP though, so I hope this will be covered in coc-sh as well.

josa42 commented 1 year ago

@martin-braun coc-sh is using bash-language-server, renaming needs to be implemented there first.

martin-braun commented 1 year ago

@josa42 Thanks, I wasn't aware about this. Great, then it just needs to be implemented on https://github.com/bash-lsp/bash-language-server and we are good to go. 🙏