baabelfish / nvim-nim Goto Github PK
View Code? Open in Web Editor NEWVim support for nim.
License: MIT License
Vim support for nim.
License: MIT License
Like http://nim-lang.org/docs/lib.html search..
Right now the omnifunc just kind of dumps the entire response from nimsuggest
, doing a simple pattern match on ^\\(def\\|sug\\|use\\|con\\|outline\\|highlight\\)\\t
. It also doesn't take into account what you already have typed after a .
, it just blows it away and replaces it with the first result, which is statistically never going to be relevant. This is not useful at all, and made me search far and wide to see if it was just something I needed to configure, because it's hard to believe anyone uses this feature the way it is!
@JCavallo Have you looked into fixing this? Your fork is the closest I have seen to making the completions better, as you started adding deoplete support.
I have spent the last few hours on it trying to get the nim#suggest
omnifunc to behave more like the one in this really good TypeScript plugin, which is perfect and behaves just as well as it would in an IDE. I have also tried getting inspiration from the vscode nim plugin, which uses nimsuggest in a much more useful way.
Both of these projects only show relevant suggestions to the variable/class under your cursor (based on their type, properties, and inheritance chain), and start the filter at whatever you had typed in after a .
, if anything. So if you had input.is<c-x><c-o>
it would populate the omnicompletion menu with isFoo
, isBar
, etc.
The reason I bring up those two projects is that between the two of them, respectively, it's clear that 1) Vim is capable of supporting a much better omnicomplete workflow, and 2) Nim is capable as well. But I'm really struggling here trying to create a better workflow! The best I have managed to do is filter the lines to those that contain the text before the cursor. Which is a good start, but I think someone better than me could pull it off a lot better.
Hi. Nice job on the plugin so far. I mainly use it for syntax highlighting. But when I tried to switch tabs using the gt
and gT
macros in command mode, I found out that they were overridden by this plugin. The lines are here:
Line 46 in a993bd7
Here is the original vim macro (scroll down to the "Navigation,") section:
http://vim.wikia.com/wiki/Using_tab_pages
I'd suggest changing them to some other keystroke and not override the default ones.
:NimMain mymain.nim
https://github.com/nim-lang/nim-mode/blob/master/nim-suggest.el#L34
While editing a nim file with vim, the first time I press ctrl-]
, vim complains:
Error detected while processing /.../bundle/nvim-nim/autoload/util.vim:
line 293:
E117: Unknown function: operator#user#define
This happens only the first time, subsequent uses of ctrl-]
result in no errors.
Installing kana/vim-operator-user fixed the error, so maybe README.md
should be updated to include this prerequisite. I think this also is the issue that leads into travis-ci builds failing.
Hi. thanks for this plugin, I really appreciated it for the syntax highlighting.
The one thing that irks me though is the automatic code folding. It really drives me up the wall. is there some configuration variable that I can set to turn this feature off? So far what I've had to do is go in and edit the source of the plugin. I don't really like to do that.
I'm using neovim 0.2.0 on windows and every command I execute gives an error such as
E118: Too many arguments for function: 279
Sorry I can't provide any more information, I've tried to fix it and I think the problem is in suggest.vim but I can't be sure.
hello @JCavallo thanks for develop this plugins, and I want to use this plugin in SpaceVim, but I fount the namespace is broken with some other plugins.
for example, if a new plugin named vim-omni
and it has autoload/omni.vim
too, then the plugin will broken.
I hope we can use a unique name space, so how about move the script to
autoload/nim/omni.vim
autoload/nim/util.vim
etc.
Unfortunately it doesn't work in neovim, throwing errors about there being too many parameters.
Thanks to the awesome @gemath on https://forum.nim-lang.org/t/4070, the fix is simple to disable async behaviour (let g:nvim_nim_enable_async=0
) and everything works correctly.
Those should always give same results
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.