skywind3000 / vim-quickui

The missing UI extensions for Vim 9 (and NeoVim) !! :sunglasses:
https://www.vim.org/scripts/script.php?script_id=5845
MIT License
1.09k stars 35 forks source link

Poject specific .nvimrc file doesn't load #3

Closed LinArcX closed 4 years ago

LinArcX commented 4 years ago

Hi. first of all, let me thank you for this amazing plugin. I'm a c/c++ developer. Depending on each project(and each build system and other factors) i prefer to create a .vimrc(.nvimrc for neovim) and put it in the root of project.

This is the content of .nvimrc for my current project:

" clear all the menus
call quickui#menu#reset()

call quickui#menu#install('&C++', [
            \ [ 'make-&debug-mode', ":w<CR> :term cd build; cmake -DCMAKE_BUILD_TYPE=Debug ../; cd ..; ln -s build/compile_commands.json .; cd build/; make;<CR>" ],
            \ [ 'run-debu&g-mode', ":w<CR> :term debug/neodm<CR>" ],
            \ [ '&make-release-mode', ":w<CR> :term cd build; cmake -DCMAKE_BUILD_TYPE=Release ../; cd ..; ln -s build/compile_commands.json .; cd build/; make;<CR>" ],
            \ [ '&run-release-mode', ":w<CR> :term release/neodm<CR>" ],
            \ [ '&clear', ":w<CR> :term rm -rfv build/**; rm -rfv debug/**; rm -rfv release/**; rm -rfv compile_commands.json<CR>" ],
            \ ], '<auto>', 'cpp')

" enable to display tips in the cmdline
let g:quickui_show_tip = 1

" hit space twice to open menu
noremap <space><space> :call quickui#menu#open()<cr>

let g:clang_format#code_style="webkit"
let g:clang_format#auto_format=1
let g:clang_format#auto_formatexpr=1
let g:clang_format#auto_format_on_insert_leave=1

And i put these lines in my init.vim:(To enable project specifics setting.)

" Enable Project-Specific Settings
" Just add .vimrc in every project you want!
set exrc
set secure

But unfortunately it doesn't work and vim-quickui seems can't load local .nvimrc file.


Os: void-linux

Neovim: v0.4.3

skywind3000 commented 4 years ago

.nvimrc is not loaded by vim-quickui. maybe this code works, but the menus have been reset in somewhere ?

LinArcX commented 4 years ago

Yes, i have two other files in these locations: /home/linarcx/.config/nvim/plugin/vim-quickui.vim

and

/home/linarcx/.config/nvim/after/ftplugin/cpp.vim

Edit: I temporarily comment those files contents and now local .nvimrc file load properly. But i want to chain them together. What should i do?

Edit2: It works!!! I removed this line in vim-quickui.vim: "call quickui#menu#reset()

Edit3: I found out that it won't work for other files.(in other directories) so i remove this line from everywhere: "call quickui#menu#reset()

And just keep this line in vim-quickui.vim: noremap <leader> :call quickui#menu#open()<cr>