Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

markdown #59

Closed
zmd56 opened this issue Dec 28, 2022 · 3 comments
Closed

markdown #59

zmd56 opened this issue Dec 28, 2022 · 3 comments
Labels
invalid This doesn't seem right

Comments

@zmd56
Copy link

zmd56 commented Dec 28, 2022

filetype = {
markdown = "MarkdownPreview",
},

zsh:1: command not found: MarkdownPreview

@zmd56
Copy link
Author

zmd56 commented Dec 31, 2022

Vim script is used to solve this problem perfectly.

vim.api.nvim_exec(
[[
" noremap rr :call CompileRunGcc()
func! CompileRunGccA()
exec "w"
for i in ["c","cpp","python","sh","html","go","lua","rust","r","nix","javascript","java"]
if &filetype == i
exec "RunFile float"
elseif &filetype == 'markdown'
exec "MarkdownPreview"
elseif &filetype == 'tex'
silent! exec "VimtexStop"
silent! exec "VimtexCompile"
endif
endfor
endfunc
]] ,
false
)

@dorrajmachai
Copy link
Contributor

dorrajmachai commented Jan 12, 2023

Hello,

Have you tried something like:

filetype = {
     markdown = "cd $dir && nvim --headless +MarkdownPreview qa",
}

...?

Based on my understanding, part of which comes from this question on Reddit, writing it this way should allow you to give code_runner a command similar to the commands used for other languages like Java, Rust, or Go. I haven't tested it yet, so I can't say for sure it will work. If you decide to try it, please let me know what happens!

Good luck!

EDIT: forgot to link to Reddit question, sorry!

@CRAG666
Copy link
Owner

CRAG666 commented Jan 14, 2023

the problem occurs, because code runner is meant to be used with terminal commands, all commands are executed in a shell

@CRAG666 CRAG666 added the invalid This doesn't seem right label Jan 14, 2023
@CRAG666 CRAG666 closed this as completed Nov 18, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants