feature: added nvim-cmp source registration and option to disable built in inline suggestions #28

Merged
kaiiserni merged 3 commits from cmp into main 2024-05-18 16:50:08 -04:00
kaiiserni commented 2024-05-17 12:09:17 -04:00 (Migrated from github.com)

Description

This pull request adds new nvim-cmp compatibility by registering itself as a source when nvim-cmp is found. This makes the plugin much more usable to me and removes the conflict between inline suggestions and cmp's suggestions. I have seen similar requests passing by a couple of times on Discord as well. Additionally, a new configuration option disable_inline_completion has been introduced to allow users to disable the built-in inline completions when relying on the nvim-cmp ones. I have also updated the README accordingly.

It seemed much nicer and more integrated to have this feature in the main repo. However, with a joint effort, it can be made into a separate plugin as well.

While at it, I also added a helper function .has_suggestion() to help with alternative implementations. (#10) (#15)

Please let me know if there is anything else I need to address before accepting this pull request.

https://github.com/supermaven-inc/supermaven-nvim/assets/87830/fce213d3-0a5c-4dce-b5ae-d9db326078aa

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

I have tested it thoroughly on Lua and TypeScript projects, and it works as expected, providing both single and multi-line suggestions.

Configuration:

  • Neovim version (nvim --version): 0.9.5
  • Operating system and version: macOS 14.4.1 (Sonoma)

Checklist

  • [ x ] My code follows the style guidelines of this project (stylua)
  • [ x ] I have performed a self-review of my own code
  • [ x ] I have commented my code, particularly in hard-to-understand areas
  • [ x ] I have made corresponding changes to the documentation
# Description This pull request adds new nvim-cmp compatibility by registering itself as a source when nvim-cmp is found. This makes the plugin much more usable to me and removes the conflict between inline suggestions and cmp's suggestions. I have seen similar requests passing by a couple of times on Discord as well. Additionally, a new configuration option disable_inline_completion has been introduced to allow users to disable the built-in inline completions when relying on the nvim-cmp ones. I have also updated the README accordingly. It seemed much nicer and more integrated to have this feature in the main repo. However, with a joint effort, it can be made into a separate plugin as well. While at it, I also added a helper function ```.has_suggestion()``` to help with alternative implementations. (#10) (#15) Please let me know if there is anything else I need to address before accepting this pull request. https://github.com/supermaven-inc/supermaven-nvim/assets/87830/fce213d3-0a5c-4dce-b5ae-d9db326078aa ## Type of change - New feature (non-breaking change which adds functionality) - This change requires a documentation update ## How Has This Been Tested? I have tested it thoroughly on Lua and TypeScript projects, and it works as expected, providing both single and multi-line suggestions. **Configuration**: - Neovim version (`nvim --version`): 0.9.5 - Operating system and version: macOS 14.4.1 (Sonoma) ## Checklist - [ x ] My code follows the style guidelines of this project (stylua) - [ x ] I have performed a self-review of my own code - [ x ] I have commented my code, particularly in hard-to-understand areas - [ x ] I have made corresponding changes to the documentation
sm-victorw (Migrated from github.com) approved these changes 2024-05-18 15:37:22 -04:00
sm-victorw (Migrated from github.com) left a comment

looks great

looks great
sm-victorw (Migrated from github.com) commented 2024-05-18 15:36:50 -04:00

nit: "SuperMaven" should be "Supermaven"

nit: "SuperMaven" should be "Supermaven"
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
supermaven-inc/supermaven-nvim!28
No description provided.