aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/plugins.vim11
-rw-r--r--lua/config/compe.lua38
-rw-r--r--lua/config/iron.lua7
-rw-r--r--lua/config/lsp.lua (renamed from lua/lsp/init.lua)38
-rw-r--r--lua/entrance.lua3
-rw-r--r--lua/plugins.lua6
6 files changed, 48 insertions, 55 deletions
diff --git a/core/plugins.vim b/core/plugins.vim
index 149ccd0..374a59f 100644
--- a/core/plugins.vim
+++ b/core/plugins.vim
@@ -545,17 +545,6 @@ endif
""""""""""""""""""""""""""""""nvim-gdb settings""""""""""""""""""""""""""""""
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""""""""""""""""""""""""""""""
let g:registers_show_empty_registers = 0
let g:registers_window_border = 'single'
diff --git a/lua/config/compe.lua b/lua/config/compe.lua
new file mode 100644
index 0000000..2e8764a
--- /dev/null
+++ b/lua/config/compe.lua
@@ -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)
diff --git a/lua/config/iron.lua b/lua/config/iron.lua
new file mode 100644
index 0000000..926fb6d
--- /dev/null
+++ b/lua/config/iron.lua
@@ -0,0 +1,7 @@
+local iron = require('iron')
+iron.core.set_config{
+ preferred = {
+ python = 'ipython'
+ },
+ repl_open_cmd = 'vertical 120 split'
+}
diff --git a/lua/lsp/init.lua b/lua/config/lsp.lua
index 7526801..bdf2b57 100644
--- a/lua/lsp/init.lua
+++ b/lua/config/lsp.lua
@@ -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)
diff --git a/lua/entrance.lua b/lua/entrance.lua
index 8839eed..f38cf27 100644
--- a/lua/entrance.lua
+++ b/lua/entrance.lua
@@ -1,5 +1,2 @@
-- Some utility stuff
require 'utils'
-
--- LSP stuff
-require 'lsp'
diff --git a/lua/plugins.lua b/lua/plugins.lua
index be6d204..edd9dd6 100644
--- a/lua/plugins.lua
+++ b/lua/plugins.lua
@@ -27,10 +27,10 @@ require('packer').startup(
use 'wbthomason/packer.nvim'
-- nvim-lsp configuration
- use 'neovim/nvim-lspconfig'
+ use {'neovim/nvim-lspconfig', event = 'VimEnter', config = [[require('config.lsp')]]}
-- auto-completion engine
- use 'hrsh7th/nvim-compe'
+ use { 'hrsh7th/nvim-compe', event = 'InsertEnter *', config = [[require('config.compe')]] }
-- Python syntax highlighting and more
if (vim.g.is_mac == 1) or (vim.g.is_win == 1) then
@@ -271,7 +271,7 @@ require('packer').startup(
end
-- REPL for nvim
- use 'hkupty/iron.nvim'
+ use {'hkupty/iron.nvim', config = [[require('config.iron')]]}
-- Show register content
use "tversteeg/registers.nvim"