Vim as ide for mql - page 11

 
Vict:

:) I'm not imposing anything on you, you came to my thread. You weren't forced here, whether to continue is up to me.

Cool...

[Deleted]  
Vict:
Managed to run into a bug in AWK, I'll post a fixed version later.

Nah, got it wrong myself. Recorded a little demonstration, worth noting what a fierce template-macro hodgepodge vector_fund is. In spite of that, correct hints and transition to definition are given, unprecedented level for a meta-editor.


ZS: watch the good quality.

#vim_as_mql_ide_5

Files:
 
Vict:

Nah, got it wrong myself. Recorded a little demonstration, worth noting what a fierce template-macro hodgepodge vector_fund is. In spite of that, correct hints and transition to definition are given, unprecedented level for a meta-editor.


ZS: look at good quality.

#vim_as_mql_ide_5

The last archive lacks vimrc, apparently the files in this archive need to be unpacked on top of the files in the other archive, not very clear how to get a consistent set.

Actively using neovim, if it works, I will join configuration development. Is it possible to put on GitHub completely vimrc and all utilities?

 
alter-ego:

The last archive is missing vimrc, apparently this archive files need to be unpacked on top of files in another archive, not very clear how to get a consistent set.

Actively using neovim, if it works, I will join configuration development. Is there any way to get the full vimrc and all utilities on GitHub?

Wo - otpolka.

 
I like MetaEditor.
I would use it to write everything else too)
[Deleted]  
alter-ego:

The last archive is missing vimrc, apparently this archive files need to be unpacked on top of files in another archive, not very clear how to get a consistent set.

Iactively use neovim, if it works, I will join configuration development. Is there any way to get vimrc and all utilities on GitHub?

I'll brush up the Readme and post it on GitHub.

[Deleted]  
alter-ego:

The last archive is missing vimrc

It's there, it's just hidden (HOME/.config/nvim/init.vim), look in the console $ ls -a

I'll brush up on the Readme and post it on GitHub

I was thinking today - it is not good to put it out in this form (editing "system" .mqh with setting exceptions), it should be somehow more elegant (teach clangd to see mqh as c++, try another lsp server, store user sources separately from MQL tree), for myself the crutch is good, but release to the world - no. I have not managed to solve it at first glance, no time for detailed analysis at all. Therefore so far so unfortunately GitHub is postponed.
 

>teach clangd to see mqh as C++

This is exactly what I did first when I ran your configuration. This is done by adding it to init.vim:

au BufNewFile,BufRead *.mq5 set filetype=cpp
au BufNewFile,BufRead *.mqh set filetype=cpp
 
Vict:

It's there, it's just hidden (HOME/.config/nvim/init.vim), look in the console $ ls -a

I was thinking today - it is not good to put in this form (editing "system" .mqh with setting exceptions), then somehow solve this problem more elegantly (teach clangd to see mqh as c++, try another lsp server, keep user sources separately from MQL tree), for myself this crutch is good, but release to the world - no. I have not managed to solve it at first glance, no time for detailed analysis at all. Therefore so far so unfortunately GitHub is postponed.

In general, it makes sense to make a language server (https://langserver.org/) for mql. Then it will catch both vim and emacs equally. And visual studio and eclipse. But this volume is substantial and 90% made by MQ developers, i.e. it is a rework of someone else's work with new bugs and fallacies.

Langserver.org
  • langserver.org
The Language Server protocol is used between a tool (the client) and a language smartness provider (the server) to integrate features like auto complete, go to definition, find all references and alike into the tool The LSP was created by Microsoft to define a common language for programming language analyzers to speak. Today, several...
[Deleted]  
alter-ego:

>teach clangd to see mqh as C++

This is exactly what I did first when I ran your configuration. This is done by adding it to init.vim:

This I did, in vimrc similar lines

function Mql_hook()
    setlocal ft=cpp
    setlocal makeprg=compile_mql
    nnoremap <buffer> <F7> :exe "make" expand('%:p')<CR>
endfunction

augroup Mode_hooks_group
    autocmd!
    autocmd FileType c call CandCPP_hook()
    autocmd FileType cpp call CandCPP_hook()
    autocmd BufNewFile,BufRead *.mq5 call Mql_hook()
    autocmd BufNewFile,BufRead *.mqh call Mql_hook()
augroup End


Autocomplete works fine in mq5 and mqh, but I've encountered a problem with it, when I've copied

#include <

Language server (LS) doesn't show hint by files (vim can do it out of the box, but LS consider -I... in compile_flags.txt). Couldn't solve it nicely, decided to automatically change all system mqh -> hh extension, which is crutchy, of course.

ZS: I was thinking, it is possible to set vim variable path for MKL projects and get correct hint without LS.