-
Notifications
You must be signed in to change notification settings - Fork 365
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
Make neomake pick local tsc executable #2553
Comments
Have you considered adding |
Hello @blueyed, do you have any suggestion about how to do it within vim? |
So this is a very naive attempt: local function add_node_bin()
local binPath = vim.fn.glob "./node_modules/.bin"
if binPath ~= "" then
vim.env.PATH = vim.env.PATH .. ":" .. binPath
-- print(fullPath)
end
end
vim.api.nvim_create_autocmd("VimEnter", { callback = add_node_bin }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
First of all, thank you for this awesome tool, it has served me well so far.
Expected behavior
I was trying to use neomake to get some compilation errors on a local typescript project, and I get an error telling me tsc is not executable. I think in my previous laptop I just had typescript installed globally, but that is not something I want to rely on.
I just noticed that you can set the executable using
let g:neomake_typescript_tsc_exe = './node_modules/.bin/tsc
, which is fantastic, and I was wondering if it would be possible to add it to neomake by default, which should use the locally installed tsc and fallback to a globally installed one if not available.Steps to reproduce
Is as easy as trying to use neomake in a typescript project without having typescript installed globally.
Output from :NeomakeInfo
Neomake debug information
Async support: 1
Current filetype: typescript
Windows: 0
[shell, shellcmdflag, shellslash]: ['/bin/zsh', '-c', 0]
makeprg=make
Enabled makers
For the current filetype ("typescript", used with :Neomake):
NOTE: you can define g:neomake_typescript_enabled_makers to configure it (or b:neomake_typescript_enabled_makers).
For the project (used with :Neomake!):
append_file: 0
args: []
auto_enabled: 1
errorformat: '%[^"]"%f"%\D%l: %m,"%f"%\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c:,%-GIn file included from %f:%l:%c,,%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-G%[ ]from %f:%l:%c,%-G%[ ]from %f:%l:,%-G%[ ]from %f:%l,,%-G%[ ]from %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,"%f", line %l%\D%c%[^ ] %m,%D%\a[%\d]: Entering directory %[
'']%f'',%X%*\a[%*\d]: Leaving directory %*[
'']%f'',%D%\a: Entering directory %['']%f'',%X%*\a: Leaving directory %*[
'']%f'',%DMaking %*\a in %f,%f|%l| %m'exe: 'make'
version information (/usr/bin/make --version): GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i386-apple-darwin11.3.0
NOTE: you can define g:neomake_enabled_makers to configure it.
Default maker settings:
Settings
New-style (dict, overrides old-style)
Old-style
:version
:messages
The text was updated successfully, but these errors were encountered: