Comments (9)
In regards to maintenance, Why not make a Github organization under the name of nvim-cmp
and develop all the plugins and sources there? Just like nvim-lua
.
from nvim-cmp.
why having the sources as different plugins instead of them being included in the main plugin as it was in nvim-compe.
it's harder to maintain iirc, there was a discussion about this in nvim-compe issue
sorry, I can't remember which one exactly (and github throws a 500 error whenever I try to check old issues/PR), but I remember I suggested to put them in a different repo but there was no maintainer back then so a lot of them stayed in compe repo
I can understand the lsp, snippets and others sources being included as extra plugins. But not having things like buffer and path which is something really basic that I feel like any completion plugin should have out the box, just seems strange to me.
I'm sure people will have different opinion on which one should be included by default. Some will say LSP should be the default since nvim-cmp supports (almost?) all LSP completion features. The source installation is just a single line (probably list them in the Wiki or something, similar to how Telescope list its extensions, people can always add their source to the wiki themself)
but anyway(!), that's also just my opinion 😆
from nvim-cmp.
Looking at the example configuration, I have two notes:
- I do not think a plugin setup should concern itself with setting mappings. Neovim already has good facilities to create mappings and having a different approach in a plugin smells like feature creep.
- In the example, sources are defined using their "name", e.g.:
sources = { { name = 'buffer' } }
. It is not clear to me how these are resolved, but it might be nice to just use thesource
item as defined in the "Source creation" part of the README instead.
from nvim-cmp.
IMO, I don't like the plugin apply mappings by itself. I think the plugin should provide <Plug>
mapping instead.
But I decided to provide setup { mapping = { ... } }
API in nvim-cmp.
The reason is that I received a lot of issues with this.
hrsh7th/nvim-compe#103
hrsh7th/nvim-compe#74
hrsh7th/nvim-compe#121
hrsh7th/nvim-compe#171
hrsh7th/nvim-compe#361
hrsh7th/nvim-compe#425
from nvim-cmp.
Not sure if I should ask this here or create a new issue. I've been following this since the beginning and something that I still don't understand the reason behind, is why having the sources as different plugins instead of them being included in the main plugin as it was in nvim-compe.
Isn't this a completion plugin ? shouldn't be some of those sources be included by default ?
Not necessarily include all of the sources that nvim-compe has by default but at least something basic like buffer and path source of completion to have a more "out the box" experience. I can understand the lsp, snippets and others sources being included as extra plugins. But not having things like buffer and path which is something really basic that I feel like any completion plugin should have out the box, just seems strange to me.
Maybe there's a good reason to go with this approach, so let me know.
But anyway that's just my opinion, I think that some sources should be included by default without having to install any extra plugin.
from nvim-cmp.
If completion plugin include sources, the issues will be hard to maintain.
Because the issues includes many source problems like current nvim-cmp issues.
And the sources may add overhead to your Vim.
Not necessarily include all of the sources that nvim-compe has by default but at least something basic like buffer and path source of completion to have a more "out the box" experience.
Yes. It can. But what is the basic? Some people say "lsp!" and some people say "I don't like buffer source!". Oh, bikeshedding arguments.
I think it is the best that none of sources are included.
from nvim-cmp.
If completion plugin include sources, the issues will be hard to maintain.
Because the issues includes many source problems like current nvim-cmp issues.
got it, that completely makes sense.
Yes. It can. But what is the basic? Some people say "lsp!" and some people say "I don't like buffer source!". Oh, bikeshedding arguments.
yes that can be problematic on what can be considered as "basic", people have their own preferences.
from nvim-cmp.
I do not think a plugin setup should concern itself with setting mappings. Neovim already has good facilities to create mappings and having a different approach in a plugin smells like feature creep.
I don't think this is feature creep there are quite a lot of examples of plugins doing this gitsigns
, nvim-tree
, diffview.nvim
, neoscroll
, orgmode.nvim
, fugitive
tbh I'd say optionally applying mappings is a very common pattern especially since currently you still have to map to strings unless you've developed something custom in your init.lua
whereas this seems to take lua functions directly which is much easier to use for the majority of people who don't have these workarounds in place already.
from nvim-cmp.
done for now.
I can create nvim-cmp
organization but I hadn't ever do it.
If you have strong opinion about it, please create separated issue.
from nvim-cmp.
Related Issues (20)
- cmp.select_next_item() gets error "attempt to perform arithmetic on local 'cursor' HOT 5
- When attempting to navigate suggestion list getting E5108 Error executing lua: .../custom_entries_view.lua:328: attempt to perform arithmetic on local 'cursor' (a nil value) HOT 3
- GLFW_PROFILE doesn't match GLFW_OPENGL_PROFILE but it does when we write GLFW_OP first HOT 1
- Update "Advanced techniques" in the Wiki HOT 1
- Improperly sized windows HOT 1
- Diagnostics window always opens from behind HOT 3
- Feature Request: complete on close HOT 3
- [Question] How would I fetch the current word that nvim cmp is completing against externally?
- preselection not working in command mode HOT 3
- Key mapping to select first snippet completion
- Disable this plugin for floating windows HOT 4
- Snippets and LSP suggestion are both inserted
- double quotes(quotes, etc) ignored by ghost text HOT 1
- Don't rely on `after/plugin` for registering sources HOT 1
- Strange bug with Svelte 5 emmet expansion - VS Code works fine
- Option to show the completion window above the cursor HOT 2
- Error "Vim:E976: Using a Blob as a String" when trying to type "snippet" word with nvim-cmp and LuaSnip HOT 1
- performance.debounce breaks cmdline completion HOT 1
- 1-5s Delay when snippets enabled for certain LSP HOT 2
- Suggetions disapearing when selecting next item. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvim-cmp.