Skip to content

Commit

Permalink
vimrc: use coc-sumneko-lua
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangyinzuo committed Apr 6, 2024
1 parent c298571 commit 7e18193
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 21 deletions.
8 changes: 5 additions & 3 deletions root/.config/nvim/lua/plugins/vimplug.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ local M = {
end
},
-- Ref: https://github.com/ibhagwan/fzf-lua
{ "junegunn/fzf", build = "./install --bin" },
{ "junegunn/fzf", build = "./install --bin" },
{
'junegunn/fzf.vim',
dependencies = { 'junegunn/fzf' },
init = function()
vim.api.nvim_command('source ~/.vim/vimrc.d/fzf.vim')
end
},
{ 'heavenshell/vim-pydocstring', ft = 'python' },
{ 'imbue-ai/jupyter_ascending.vim', ft = 'python' },
{
'voldikss/vim-floaterm',
init = function()
Expand Down Expand Up @@ -108,7 +110,7 @@ local M = {
'pechorin/any-jump.vim',
{ 'jupyter-vim/jupyter-vim', cmd = { 'JupyterConnect' } },
'goerz/jupytext.vim',
{ 'jpalardy/vim-slime', ft = { 'python', 'ocaml' } },
{ 'jpalardy/vim-slime', ft = { 'python', 'ocaml' } },
{
"iamcco/markdown-preview.nvim",
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
Expand All @@ -118,7 +120,7 @@ local M = {
end,
ft = { "markdown" },
},
{ 'whonore/Coqtail', ft = 'coq' },
{ 'whonore/Coqtail', ft = 'coq' },
{
dir = "~/.vim/pack/my_plugins/start/project.vim",
dependencies = {
Expand Down
6 changes: 0 additions & 6 deletions root/.vim/coc-settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@
"buildDirectory": "build"
}
},
"lua": {
"command": "lua-lsp",
"filetypes": [
"lua"
]
},
"ocaml-lsp": {
"command": "opam",
"args": [
Expand Down
8 changes: 4 additions & 4 deletions root/.vim/vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if has('autocmd') " vim-tiny does not have autocmd
" coc-explorer will kill neovim's intro, quickly type <space> or other key
" when starting can avoid it.
" https://github.com/neoclide/coc.nvim/issues/3409#issuecomment-1337825854
" let g:coc_global_extensions = ['coc-lists', 'coc-ultisnips', 'coc-json', 'coc-vimtex', 'coc-ltex', 'coc-texlab', 'coc-rust-analyzer', 'coc-clangd', 'coc-pyright', 'coc-java', 'coc-java-debug', 'coc-go', 'coc-tsserver', 'coc-dictionary', 'coc-word', 'coc-tag', 'coc-emoji', '@yaegassy/coc-marksman', 'coc-html', 'coc-symbol-line']
" let g:coc_global_extensions = ['coc-lists', 'coc-ultisnips', 'coc-json', 'coc-vimtex', 'coc-ltex', 'coc-texlab', 'coc-sumneko-lua', 'coc-rust-analyzer', 'coc-clangd', 'coc-pyright', 'coc-java', 'coc-java-debug', 'coc-go', 'coc-tsserver', 'coc-dictionary', 'coc-word', 'coc-tag', 'coc-emoji', '@yaegassy/coc-marksman', 'coc-html', 'coc-symbol-line']
let g:coc_global_extensions = get(g:, 'coc_global_extensions', [])

let g:clangd_path = get(g:, 'clangd_path', '/usr/bin/clangd')
Expand Down Expand Up @@ -177,15 +177,15 @@ if has('autocmd') " vim-tiny does not have autocmd
" do not add too much root marks, it will slow down search performance
let g:RootMarks = ['.git', g:project_vimrc, '.root']

" plugin.vim 可能会改变g:no_plug的值
" vimplug.vim 可能会改变g:no_plug的值
let g:no_plug = (glob(g:vim_plug_dir) == "") || &loadplugins == 0
if exists("g:vscode")
let g:loaded_netrw = 1
let g:loaded_netrwPlugin = 1
if has('nvim')
runtime lazy.lua
else
source ~/.vim/vimrc.d/plugin.vim
source ~/.vim/vimrc.d/vimplug.vim
endif
finish
endif
Expand Down Expand Up @@ -400,7 +400,7 @@ if has('autocmd') " vim-tiny does not have autocmd
if has('nvim')
runtime lazy.lua
else
source ~/.vim/vimrc.d/plugin.vim
source ~/.vim/vimrc.d/vimplug.vim
endif
endif

Expand Down
9 changes: 9 additions & 0 deletions root/.vim/vimrc.d/plugin_setup.vim
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,18 @@ if has('nvim') || v:version >= 802
let g:quickui_context = [['hello', 'echo "hello world!"']]
let g:quickui_border_style = 2

let g:pydocstring_doq_path = 'doq'
let g:pydocstring_formatter = 'numpy'

let g:jupyter_mapkeys = 0
let g:jupyter_cell_separators = ['\s*##']

let g:jupyter_ascending_default_mappings = 0
let g:jupyter_ascending_python_executable = 'python3'
" 同步到浏览器内存中,若要同步到.ipynb文件中,需要浏览器手动/自动定时保存
" 或执行 jupytext --to ipynb hello2.sync.py,(虽然会丢失执行结果)
let g:jupyter_ascending_auto_write = v:true

let g:jupytext_fmt = 'py'

" ocaml utop在第一次send时可能会失败,需要再send一次,或提前打开:SlimeConfig
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ if !exists('g:vscode')
" paste img in markdown/latex style
Plug 'jiangyinzuo/img-paste.vim'

if has('nvim') || v:version >= 802
if v:version >= 802
Plug 'skywind3000/vim-quickui'
Plug 'pechorin/any-jump.vim'

Expand All @@ -220,20 +220,13 @@ if !exists('g:vscode')

" require +job
Plug 'heavenshell/vim-pydocstring', { 'for': 'python' }
let g:pydocstring_doq_path = 'doq'
let g:pydocstring_formatter = 'numpy'

" vim和jupyter notebook(运行在浏览器上)同步,
" 需要安装jupyter_ascending, 目前不支持notebook 7
" :h jupyter-notebook
" See: https://github.com/imbue-ai/jupyter_ascending
" See: https://alpha2phi.medium.com/jupyter-notebook-vim-neovim-c2d67d56d563#c0ed
Plug 'imbue-ai/jupyter_ascending.vim', {'for': 'python'}
let g:jupyter_ascending_default_mappings = 0
let g:jupyter_ascending_python_executable = 'python3'
" 同步到浏览器内存中,若要同步到.ipynb文件中,需要浏览器手动/自动定时保存
" 或执行 jupytext --to ipynb hello2.sync.py,(虽然会丢失执行结果)
let g:jupyter_ascending_auto_write = v:true

" vim和jupyter console/qtconsole同步
" :h jupyter-qtconsole
Expand Down

0 comments on commit 7e18193

Please sign in to comment.