mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
update packer and plugin settings
This commit is contained in:
parent
a694d00820
commit
3dce4506eb
@ -545,17 +545,6 @@ endif
|
|||||||
""""""""""""""""""""""""""""""nvim-gdb settings""""""""""""""""""""""""""""""
|
""""""""""""""""""""""""""""""nvim-gdb settings""""""""""""""""""""""""""""""
|
||||||
nnoremap <leader>dp :<C-U>GdbStartPDB python -m pdb %<CR>
|
nnoremap <leader>dp :<C-U>GdbStartPDB python -m pdb %<CR>
|
||||||
|
|
||||||
""""""""""""""""""""""""""""""iron.nvim settings""""""""""""""""""""""""""""""
|
|
||||||
lua << EOF
|
|
||||||
local iron = require('iron')
|
|
||||||
iron.core.set_config{
|
|
||||||
preferred = {
|
|
||||||
python = 'ipython'
|
|
||||||
},
|
|
||||||
repl_open_cmd = 'vertical 120 split'
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
""""""""""""""""""""""""""""""register.nvim settings""""""""""""""""""""""""""""""
|
""""""""""""""""""""""""""""""register.nvim settings""""""""""""""""""""""""""""""
|
||||||
let g:registers_show_empty_registers = 0
|
let g:registers_show_empty_registers = 0
|
||||||
let g:registers_window_border = 'single'
|
let g:registers_window_border = 'single'
|
||||||
|
|||||||
38
lua/config/compe.lua
Normal file
38
lua/config/compe.lua
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
-- nvim-compe settings
|
||||||
|
require'compe'.setup {
|
||||||
|
enabled = true;
|
||||||
|
autocomplete = true;
|
||||||
|
debug = false;
|
||||||
|
min_length = 1;
|
||||||
|
preselect = 'enable';
|
||||||
|
throttle_time = 80;
|
||||||
|
source_timeout = 200;
|
||||||
|
incomplete_delay = 400;
|
||||||
|
max_abbr_width = 100;
|
||||||
|
max_kind_width = 100;
|
||||||
|
max_menu_width = 100;
|
||||||
|
documentation = true;
|
||||||
|
|
||||||
|
source = {
|
||||||
|
omni = {filetypes = {'tex'}};
|
||||||
|
path = true;
|
||||||
|
buffer = false;
|
||||||
|
spell = {filetypes = {'markdown', 'tex'}};
|
||||||
|
emoji = true;
|
||||||
|
nvim_lsp = true;
|
||||||
|
nvim_lua = true;
|
||||||
|
ultisnips = true;
|
||||||
|
calc = false;
|
||||||
|
vsnip = false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
vim.o.completeopt = "menuone,noselect"
|
||||||
|
|
||||||
|
-- nvim-compe mappings
|
||||||
|
local compe_map_opts = {expr = true, noremap = true, silent = true}
|
||||||
|
vim.api.nvim_set_keymap('i', '<C-Space>', 'compe#complete()', compe_map_opts)
|
||||||
|
vim.api.nvim_set_keymap('i', '<CR>', "compe#confirm('<CR>')", compe_map_opts)
|
||||||
|
vim.api.nvim_set_keymap('i', '<ESC>', "compe#close('<ESC>')", compe_map_opts)
|
||||||
|
vim.api.nvim_set_keymap('i', '<C-f>', "compe#scroll({'delta': +4})", compe_map_opts)
|
||||||
|
vim.api.nvim_set_keymap('i', '<C-d>', "compe#scroll({'delta': -4})", compe_map_opts)
|
||||||
7
lua/config/iron.lua
Normal file
7
lua/config/iron.lua
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
local iron = require('iron')
|
||||||
|
iron.core.set_config{
|
||||||
|
preferred = {
|
||||||
|
python = 'ipython'
|
||||||
|
},
|
||||||
|
repl_open_cmd = 'vertical 120 split'
|
||||||
|
}
|
||||||
@ -126,41 +126,3 @@ vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
-- nvim-compe settings
|
|
||||||
require'compe'.setup {
|
|
||||||
enabled = true;
|
|
||||||
autocomplete = true;
|
|
||||||
debug = false;
|
|
||||||
min_length = 1;
|
|
||||||
preselect = 'enable';
|
|
||||||
throttle_time = 80;
|
|
||||||
source_timeout = 200;
|
|
||||||
incomplete_delay = 400;
|
|
||||||
max_abbr_width = 100;
|
|
||||||
max_kind_width = 100;
|
|
||||||
max_menu_width = 100;
|
|
||||||
documentation = true;
|
|
||||||
|
|
||||||
source = {
|
|
||||||
omni = {filetypes = {'tex'}};
|
|
||||||
path = true;
|
|
||||||
buffer = false;
|
|
||||||
spell = {filetypes = {'markdown', 'tex'}};
|
|
||||||
emoji = true;
|
|
||||||
nvim_lsp = true;
|
|
||||||
nvim_lua = true;
|
|
||||||
ultisnips = true;
|
|
||||||
calc = false;
|
|
||||||
vsnip = false;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
vim.o.completeopt = "menuone,noselect"
|
|
||||||
|
|
||||||
-- nvim-compe mappings
|
|
||||||
local compe_map_opts = {expr = true, noremap = true, silent = true}
|
|
||||||
vim.api.nvim_set_keymap('i', '<C-Space>', 'compe#complete()', compe_map_opts)
|
|
||||||
vim.api.nvim_set_keymap('i', '<CR>', "compe#confirm('<CR>')", compe_map_opts)
|
|
||||||
vim.api.nvim_set_keymap('i', '<ESC>', "compe#close('<ESC>')", compe_map_opts)
|
|
||||||
vim.api.nvim_set_keymap('i', '<C-f>', "compe#scroll({'delta': +4})", compe_map_opts)
|
|
||||||
vim.api.nvim_set_keymap('i', '<C-d>', "compe#scroll({'delta': -4})", compe_map_opts)
|
|
||||||
@ -1,5 +1,2 @@
|
|||||||
-- Some utility stuff
|
-- Some utility stuff
|
||||||
require 'utils'
|
require 'utils'
|
||||||
|
|
||||||
-- LSP stuff
|
|
||||||
require 'lsp'
|
|
||||||
|
|||||||
@ -27,10 +27,10 @@ require('packer').startup(
|
|||||||
use 'wbthomason/packer.nvim'
|
use 'wbthomason/packer.nvim'
|
||||||
|
|
||||||
-- nvim-lsp configuration
|
-- nvim-lsp configuration
|
||||||
use 'neovim/nvim-lspconfig'
|
use {'neovim/nvim-lspconfig', event = 'VimEnter', config = [[require('config.lsp')]]}
|
||||||
|
|
||||||
-- auto-completion engine
|
-- auto-completion engine
|
||||||
use 'hrsh7th/nvim-compe'
|
use { 'hrsh7th/nvim-compe', event = 'InsertEnter *', config = [[require('config.compe')]] }
|
||||||
|
|
||||||
-- Python syntax highlighting and more
|
-- Python syntax highlighting and more
|
||||||
if (vim.g.is_mac == 1) or (vim.g.is_win == 1) then
|
if (vim.g.is_mac == 1) or (vim.g.is_win == 1) then
|
||||||
@ -271,7 +271,7 @@ require('packer').startup(
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- REPL for nvim
|
-- REPL for nvim
|
||||||
use 'hkupty/iron.nvim'
|
use {'hkupty/iron.nvim', config = [[require('config.iron')]]}
|
||||||
|
|
||||||
-- Show register content
|
-- Show register content
|
||||||
use "tversteeg/registers.nvim"
|
use "tversteeg/registers.nvim"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user