-
Notifications
You must be signed in to change notification settings - Fork 318
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
Error on Compiling Command-T Plugin (clang) #388
Comments
In general, I don't think you should have to mess with specific SDKs or anything. What version of Ruby are you running? The one that comes with the system? Homebrew? Something else? |
I see. I noticed I was using a bit old-fashioned 2.6.3p62 version Ruby, so I installed and switched to the latest 3.1.1 with rbenv.
Though then I run
this again, there's still the same error msg:( Next, following your doc., I run this following command in my Nvim
and it says my Neovim's still linked with the old version Ruby. So I rebuilt with Homebrew but the link doesn't change. Do you think the linkage matters? How I can change it even the rebuild doesn't work. Or maybe my Xcode's version is a bit outdated, which is 12.4? P.s.
Even after switching to 3.1.1 and rbenv versions says it works, the above command doesn't match that, which makes me wonder. JFYI. |
What matters is that the version numbers must match up — Command-T will be happy with an old version, or with a recent version, as long as it's the same one that Neovim itself is using. The specific thing about the SDK is indicative of something weird and macOS related (because the Ruby headers are embedded inside the SDK, if I recall correctly). Sorry about the hassle; Command-T itself isn't doing anything strange here — it's just using After you run |
I've made sure that Nvim and Terminal(inside command-t dir.) are using the same 2.6.3p62 version Ruby,
|
I corrected l. 91 as following.
Then I run,
so it seemed worked. However when I type :CommandT in Nvim command, I still got the following error msg., and I noticed which is the same one with #385 coincidentally.
P.s. |
It may be just that (a coincidence)... it's going to display something like that whenever there's a total failure to load the Ruby module. You can see the code that is doing that here. One way to try and see what's happening would be to run some of those commands by hand. For example:
If that fails the first time around with
and then try modifying it (obviously substituting the actual paths to your
If that works, it may be that Command-T's plug-in directory isn't in your
Me too. 😁 |
P.S. (Pre-Script) -- After adding $LOAD_PATHs,
I also did
My
-- In addition to this, I wonder where and how I should write these $LOAD_PATH and rtp config., so I can make it reflected permanently. (I set my config. of Nvim in |
The thing is, you shouldn't have to manually mess with your
You probably need this after the
But like I said, you shouldn't have to be doing any of that... the code I linked to in my previous comment is supposed to |
At last, I got how to make command-t work temporarily! To sum up and jog it down for other users of this plugin facing the same problem, I fixed by running following commands in Nvim.
Before closing this issue, my last question is where to put these 4 lines, +α:
Is there a way to set command-t not to go look into my photos? |
Well, as I said, you shouldn't have to do this. The question is, why isn't the code in the plug-in doing it already on your behalf? I obviously can't reproduce the problem you've reported here, but if I could, I would want to put logging statements in there to figure out exactly where it is failing... Having said that, if you just want to dump this somewhere and move on, you could put it in your vimrc after the plugin has loaded. Given that the set-up is supposed to happen in response to autoloading, you might want to trigger that first with
That will happen if you run Vim in a current working directory that is or contains (directly or indirectly) your photos directory. All of the file scanners work in this way — they recursively search from the current directory and find whatever you have in there. So, the "workaround" is to not use Command-T in directories where you don't want it searching. The tip about |
I was having the same problem and I managed to get this working by having this in my config
Previously it was just
I'm currently using ruby 2.7.5. I do have some problems -- when opening a file, the cursor gets placed at the start of the file (as if pressing I have an autocommand that jumps to the last edit position -- this does happen but after half a second, it goes back to the top when a file is opened via CommandT. Is this intentional? Also, is it possible to use other find commands such as |
Nope, @yujinyuz. Unless you configure it otherwise (eg. via
And command-t/plugin/command-t.vim Line 9 in c797e8b
Calling command-t/autoload/commandt.vim Lines 168 to 181 in c797e8b
Which basically all boils down to this:
So, if you see the cursor jumping around after all that, it's probably some other plugin, autocommand, or other configuration that is making it do so. |
@wincent thanks for the response! It does seem to be caused by this plugin: https://github.com/luukvbaal/stabilize.nvim Adding it to the ignore list of stabilize.nvim doesn't seem to fix the issue. It doesn't happen when using file finders such as fzf-lua or telescope, and also the normal |
@yujinyuz I imagine it doesn't affect plugins like Telescope because they (probably) use floating windows whereas Command-T was written long before floating windows existed and so uses normal windows. I'll rewrite it one day to use the newer APIs, but not anytime soon, as it will be a huge undertaking (effectively equivalent to porting from Ruby to Lua). |
@wincent That might be the case. Thanks for your answers! I'll be looking forward to the lua rewrite! |
Hi all, I was having a play and I also run into this issue. At first had the plugin in
I then moved it into Hope this helps, and thanks for all the work 👍 |
Given the big rewrite for v6.0.x, I'm closing all older issues as there is unlikely to be anything significant happening on the Footnotes
|
While running the make command following this documentation I got this error message:
So I go to check my Xcode files:
Here is what I got.
I think I'm missing MacOSX11.6.Internal.sdk so I cannot accomplish this task.
I'm not sure that my assumption is right,
if so, how can I get this specific SDK?
If not, how should I solve this to make command-t work?
The text was updated successfully, but these errors were encountered: