Compare commits
15 Commits
6a15552112
...
nvimlua
Author | SHA1 | Date | |
---|---|---|---|
c0065fa945 | |||
23ba611075 | |||
bd11e06a19 | |||
99f81ebf0a | |||
042e537d0f | |||
bd189488ef | |||
d79af567a3 | |||
c2fde917f0 | |||
e6e0b7d9f8 | |||
8556a58bcd | |||
d99fd0871e | |||
11c7c9a88c | |||
d926d41a36 | |||
cdf6a55884 | |||
653e869e1c |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,3 +4,4 @@ zsh/.config/zsh/.zhistory
|
||||
vifm/.config/vifm/vifm-help.txt
|
||||
vifm/.config/vifm/vifminfo.json
|
||||
|
||||
nvim/.config/nvim/autoload
|
||||
|
@@ -1,5 +1,5 @@
|
||||
" Use completion-nvim in every buffer
|
||||
autocmd BufEnter * lua require'completion'.on_attach()
|
||||
autocmd BufEnter * lua require'nvim-comp'.on_attach()
|
||||
|
||||
let g:completion_enable_snippet = 'UltiSnips'
|
||||
let g:completion_matching_strategy_list = ['exact', 'substring', 'fuzzy']
|
||||
|
@@ -61,7 +61,9 @@ colorscheme zenburn
|
||||
|
||||
" Set completeopt to have a better completion experience
|
||||
" set completeopt=menuone,noinsert,noselect
|
||||
set completeopt=menuone,noselect
|
||||
" set completeopt=menuone,noselect
|
||||
|
||||
" Avoid showing message extra message when using completion
|
||||
set shortmess+=c
|
||||
|
||||
let g:indentLine_setConceal = 0
|
||||
|
5
nvim/.config/nvim/init.lua
Normal file
5
nvim/.config/nvim/init.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
require('plugins')
|
||||
require('settings')
|
||||
require('mappings')
|
||||
|
||||
require('lsp')
|
@@ -1,15 +0,0 @@
|
||||
source $HOME/.config/nvim/plugins/plugins.vim
|
||||
source $HOME/.config/nvim/general/settings.vim
|
||||
source $HOME/.config/nvim/general/mappings.vim
|
||||
" source $HOME/.confia/vim/general/completion.vim
|
||||
|
||||
source $HOME/.config/nvim/plugins/lightline.vim
|
||||
source $HOME/.config/nvim/plugins/nvim-comp.vim
|
||||
|
||||
lua <<EOF
|
||||
require("lsp")
|
||||
EOF
|
||||
|
||||
" bug fix with telescope and insert mode https://GitHub.com/vim telescope/telescope.vim/issues/82
|
||||
autocmd FileType TelescopePrompt
|
||||
\ call deoplete#custom#buffer_option('auto_complete', v:false)
|
98
nvim/.config/nvim/lua/completion.lua
Normal file
98
nvim/.config/nvim/lua/completion.lua
Normal file
@@ -0,0 +1,98 @@
|
||||
local has_words_before = function()
|
||||
if vim.api.nvim_buf_get_option(0, "buftype") == "prompt" then
|
||||
return false
|
||||
end
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||
end
|
||||
|
||||
local feedkey = function(key, mode)
|
||||
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true), mode, true)
|
||||
end
|
||||
|
||||
local lsp_symbols = {
|
||||
Text = " (Text) ",
|
||||
Method = " (Method)",
|
||||
Function = " (Function)",
|
||||
Constructor = " (Constructor)",
|
||||
Field = " ﴲ (Field)",
|
||||
Variable = "[] (Variable)",
|
||||
Class = " (Class)",
|
||||
Interface = " ﰮ (Interface)",
|
||||
Module = " (Module)",
|
||||
Property = " 襁 (Property)",
|
||||
Unit = " (Unit)",
|
||||
Value = " (Value)",
|
||||
Enum = " 練 (Enum)",
|
||||
Keyword = " (Keyword)",
|
||||
Snippet = " (Snippet)",
|
||||
Color = " (Color)",
|
||||
File = " (File)",
|
||||
Reference = " (Reference)",
|
||||
Folder = " (Folder)",
|
||||
EnumMember = " (EnumMember)",
|
||||
Constant = " ﲀ (Constant)",
|
||||
Struct = " ﳤ (Struct)",
|
||||
Event = " (Event)",
|
||||
Operator = " (Operator)",
|
||||
TypeParameter = " (TypeParameter)",
|
||||
}
|
||||
|
||||
local cmp = require'cmp'
|
||||
cmp.setup{
|
||||
completion = {
|
||||
completeopt = "menuone,noinsert,noselect",
|
||||
},
|
||||
formatting = {
|
||||
format = function(entry, vim_item)
|
||||
-- fancy icons and a name of kind
|
||||
vim_item.kind = lsp_symbols[vim_item.kind]
|
||||
-- set a name for each source
|
||||
vim_item.menu = ({
|
||||
buffer = "[Buffer]",
|
||||
nvim_lsp = "[LSP]",
|
||||
vsnip = "[vSnip]",
|
||||
path = "[Path]",
|
||||
spell = "[Spell]",
|
||||
})[entry.source.name]
|
||||
return vim_item
|
||||
end,
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.fn["vsnip#anonymous"](args.body)
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
-- ["<cr>"] = cmp.mapping.confirm({select = true, behavior = cmp.ConfirmBehavior.Replace}),
|
||||
["<cr>"] = cmp.mapping.confirm({select = true, behavior = cmp.ConfirmBehavior.Insert}),
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if vim.fn.pumvisible() == 1 then
|
||||
feedkey("<C-n>", "n")
|
||||
elseif vim.fn["vsnip#available"]() == 1 then
|
||||
feedkey("<Plug>(vsnip-expand-or-jump)", "")
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback() -- The fallback function sends a already mapped key. In this case, it's probably `<Tab>`.
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
|
||||
["<S-Tab>"] = cmp.mapping(function()
|
||||
if vim.fn.pumvisible() == 1 then
|
||||
feedkey("<C-p>", "n")
|
||||
elseif vim.fn["vsnip#jumpable"](-1) == 1 then
|
||||
feedkey("<Plug>(vsnip-jump-prev)", "")
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
},
|
||||
source = {
|
||||
{ name = 'buffer' },
|
||||
{ name = 'vsnip' },
|
||||
{ name = 'path' },
|
||||
{ name = 'spell' },
|
||||
}
|
||||
}
|
||||
|
||||
vim.cmd [[autocmd FileType TelescopePrompt lua require('cmp').setup.buffer { enabled = false }]]
|
||||
vim.g.vsnip_snippet_dir = '~/.config/nvim/vsnips'
|
23
nvim/.config/nvim/lua/config/vimtex.lua
Normal file
23
nvim/.config/nvim/lua/config/vimtex.lua
Normal file
@@ -0,0 +1,23 @@
|
||||
vim.g.maplocalleader = " "
|
||||
|
||||
vim.g.vimtex_compiler_latex = {}
|
||||
vim.g.vimtex_compiler_latex["backend"] = 'nvim'
|
||||
|
||||
vim.g.vimtex_compiler_latex['backend'] = 'nvim'
|
||||
vim.g.vimtex_compiler_latex['background'] = 1
|
||||
vim.g.vimtex_compiler_latex[ 'build_dir'] = ''
|
||||
vim.g.vimtex_compiler_latex[ 'callback'] = 0
|
||||
vim.g.vimtex_compiler_latex[ 'continuous'] = 1
|
||||
vim.g.vimtex_compiler_latex[ 'options'] = { '-pdf',
|
||||
'-verbose',
|
||||
'-file-line-error',
|
||||
'-synctex=1',
|
||||
'-interaction=nonstopmode',
|
||||
'-silent',
|
||||
'-shell-escape',
|
||||
}
|
||||
|
||||
vim.g.vimtex_view_method = 'zathura'
|
||||
|
||||
-- Les fichiers sty et cls sont vus comme des fichiers tex
|
||||
vim.cmd("autocmd BufRead,BufNewFile *.{sty,cls} setlocal syntax=tex")
|
@@ -1,6 +1,4 @@
|
||||
|
||||
require'lspconfig'.pyright.setup{}
|
||||
|
||||
local nvim_lsp = require('lspconfig')
|
||||
|
||||
-- Use an on_attach function to only map the following keys
|
||||
@@ -21,33 +19,33 @@ local on_attach = function(client, bufnr)
|
||||
-- show documentation
|
||||
buf_set_keymap('n', 'K', '<Cmd>lua vim.lsp.buf.hover()<CR>', opts)
|
||||
-- Rename
|
||||
buf_set_keymap('n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
|
||||
buf_set_keymap('n', '<leader>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
|
||||
|
||||
-- je sais pas ce c'est que ces workspaces
|
||||
buf_set_keymap('n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
|
||||
buf_set_keymap('n', '<space>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
|
||||
buf_set_keymap('n', '<space>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
|
||||
buf_set_keymap('n', '<leader>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
|
||||
buf_set_keymap('n', '<leader>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
|
||||
buf_set_keymap('n', '<leader>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
|
||||
-- ??
|
||||
buf_set_keymap('n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
|
||||
buf_set_keymap('n', '<leader>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
|
||||
-- Details on diagnostics
|
||||
buf_set_keymap('n', '<space>d', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
|
||||
buf_set_keymap('n', '<leader>d', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
|
||||
-- Cycle over diagnostics
|
||||
buf_set_keymap('n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
|
||||
buf_set_keymap('n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
|
||||
-- Get diagnostic on local list
|
||||
buf_set_keymap('n', '<space>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
|
||||
buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
|
||||
buf_set_keymap('n', '<leader>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
|
||||
buf_set_keymap("n", "<leader>f", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
|
||||
|
||||
buf_set_keymap('n', 'gD', '<Cmd>lua vim.lsp.buf.declaration()<CR>', opts)
|
||||
buf_set_keymap('n', 'gd', '<Cmd>lua vim.lsp.buf.definition()<CR>', opts)
|
||||
buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
|
||||
buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
|
||||
buf_set_keymap('n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
|
||||
buf_set_keymap('n', '<leader>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
|
||||
end
|
||||
|
||||
-- Use a loop to conveniently call 'setup' on multiple servers and
|
||||
-- map buffer local keybindings when the language server attaches
|
||||
local servers = { "pyright" }
|
||||
local servers = { "texlab", "pyright", "vuels", "tsserver" }
|
||||
for _, lsp in ipairs(servers) do
|
||||
nvim_lsp[lsp].setup {
|
||||
on_attach = on_attach,
|
||||
@@ -56,3 +54,9 @@ for _, lsp in ipairs(servers) do
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
nvim_lsp.vuels.setup{
|
||||
on_attach = function(client)
|
||||
client.resolved_capabilities.document_formatting = true
|
||||
end;
|
||||
}
|
||||
|
22
nvim/.config/nvim/lua/mappings.lua
Normal file
22
nvim/.config/nvim/lua/mappings.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
local map = vim.api.nvim_set_keymap
|
||||
local default_opts = {noremap = true, silent = true}
|
||||
|
||||
-- move around splits using Ctrl + {h,j,k,l}
|
||||
map('n', '<C-h>', '<C-w>h', default_opts)
|
||||
map('n', '<C-j>', '<C-w>j', default_opts)
|
||||
map('n', '<C-k>', '<C-w>k', default_opts)
|
||||
map('n', '<C-l>', '<C-w>l', default_opts)
|
||||
|
||||
-- Align blocks of text and keep them selected
|
||||
map('v', '<', '<gv', {})
|
||||
map('v', '>', '>gv', {})
|
||||
|
||||
|
||||
-- Automatically spell check last error in insert mode
|
||||
map('i', '<c-f>', '<c-g>u<Esc>[s1z=`]a<c-g>u', default_opts)
|
||||
|
||||
-- Find files using Telescope command-line sugar.
|
||||
map('n', '<leader>e', '<cmd>Telescope find_files<cr>', {})
|
||||
map('n', '<leader>g', '<cmd>Telescope live_grep<cr>', {})
|
||||
map('n', '<leader>b', '<cmd>Telescope buffers<cr>', {})
|
||||
map('n', '<leader>h', '<cmd>Telescope help_tags<cr>', {})
|
86
nvim/.config/nvim/lua/plugins.lua
Normal file
86
nvim/.config/nvim/lua/plugins.lua
Normal file
@@ -0,0 +1,86 @@
|
||||
-- Only required if you have packer configured as `opt`
|
||||
vim.cmd [[packadd packer.nvim]]
|
||||
|
||||
return require('packer').startup(function()
|
||||
use 'morhetz/gruvbox'
|
||||
|
||||
-- Status line
|
||||
use {
|
||||
'hoob3rt/lualine.nvim',
|
||||
config = function ()
|
||||
require('lualine').setup{
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'gruvbox',
|
||||
component_separators = {'', ''},
|
||||
section_separators = {'', ''},
|
||||
disabled_filetypes = {}
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {'mode'},
|
||||
lualine_b = {'branch'},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {
|
||||
{ 'diagnostics', sources = {"nvim_lsp"}, symbols = {error = ' ', warn = ' ', info = ' ', hint = ' '} },
|
||||
'encoding',
|
||||
'filetype'
|
||||
},
|
||||
lualine_y = {'progress'},
|
||||
lualine_z = {'location'}
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {'location'},
|
||||
lualine_y = {},
|
||||
lualine_z = {}
|
||||
},
|
||||
tabline = {},
|
||||
extensions = {}
|
||||
}
|
||||
end
|
||||
}
|
||||
|
||||
use 'tpope/vim-fugitive'
|
||||
use 'mhinz/vim-signify'
|
||||
|
||||
use 'tpope/vim-surround'
|
||||
use 'tpope/vim-repeat'
|
||||
|
||||
use 'neovim/nvim-lspconfig'
|
||||
use {
|
||||
"hrsh7th/nvim-cmp",
|
||||
event = 'InsertEnter',
|
||||
config = [[require('completion')]],
|
||||
requires = {
|
||||
-- 'hrsh7th/vim-vsnip-integ',
|
||||
'rafamadriz/friendly-snippets',
|
||||
},
|
||||
}
|
||||
use {"hrsh7th/vim-vsnip", after = "nvim-cmp"}
|
||||
use {"hrsh7th/cmp-vsnip", after = "nvim-cmp"}
|
||||
use {"hrsh7th/cmp-buffer", after = "nvim-cmp"}
|
||||
use {'hrsh7th/cmp-path', after = "nvim-cmp"}
|
||||
use {"hrsh7th/cmp-nvim-lsp", after = "nvim-cmp"}
|
||||
use {'f3fora/cmp-spell', after = "nvim-cmp"}
|
||||
|
||||
use 'nvim-lua/popup.nvim'
|
||||
use {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
requires = { {'nvim-lua/plenary.nvim'} }
|
||||
}
|
||||
|
||||
use {
|
||||
'lervag/vimtex',
|
||||
config = [[require('config.vimtex')]],
|
||||
}
|
||||
|
||||
-- Highlight on Yank
|
||||
use 'machakann/vim-highlightedyank'
|
||||
-- Autoclose parenthesis
|
||||
use 'jiangmiao/auto-pairs'
|
||||
|
||||
use 'kyazdani42/nvim-web-devicons'
|
||||
|
||||
end)
|
51
nvim/.config/nvim/lua/settings.lua
Normal file
51
nvim/.config/nvim/lua/settings.lua
Normal file
@@ -0,0 +1,51 @@
|
||||
local cmd = vim.cmd -- execute Vim commands
|
||||
local exec = vim.api.nvim_exec -- execute Vimscript
|
||||
-- local fn = vim.fn -- call Vim functions
|
||||
local g = vim.g -- global variables
|
||||
local opt = vim.opt -- global/buffer/windows-scoped options
|
||||
|
||||
g.mapleader = ' ' -- Leaderkey
|
||||
g.showmode = true
|
||||
g.hidden = true -- Required to keep multiple buffers open multiple buffers
|
||||
opt.mouse = 'a' -- enable mouse
|
||||
opt.clipboard = 'unnamedplus' -- copy/paste with system
|
||||
opt.swapfile = false -- no swapfile
|
||||
|
||||
opt.wrap = true -- Display long lines as just one line
|
||||
opt.expandtab = true -- Use space instead of tabs
|
||||
opt.tabstop = 4 -- Insert 4 spaces for a tab
|
||||
opt.shiftwidth = 4 -- Change the number of space characters inserted for indentation
|
||||
opt.smarttab = true -- Makes tabbing smarter will realize you have 2 vs 4
|
||||
opt.autoindent = true -- Good auto indent
|
||||
opt.foldmethod='indent'
|
||||
|
||||
opt.number = true -- show line number
|
||||
opt.relativenumber = true -- show relative line number
|
||||
opt.cursorline = true -- highlight current line
|
||||
|
||||
opt.ignorecase = true -- Ignore case on search
|
||||
opt.smartcase = true -- ignore lowercse for the whoel pattern
|
||||
|
||||
-- opt.completeopt = 'menu,noselect,noinsert' -- completion options
|
||||
|
||||
opt.spell = true
|
||||
opt.spelllang = {'fr', 'en'}
|
||||
|
||||
opt.nrformats = opt.nrformats + 'alpha'
|
||||
|
||||
g.showtabline = true
|
||||
|
||||
-- don't auto commenting new lines
|
||||
cmd[[au BufEnter * set fo-=c fo-=r fo-=o]]
|
||||
|
||||
opt.showmatch = true -- show parenthethis match
|
||||
|
||||
-- Highlight on yank
|
||||
exec([[
|
||||
augroup YankHighlight
|
||||
autocmd!
|
||||
autocmd TextYankPost * silent! lua vim.highlight.on_yank{higroup="IncSearch", timeout=700}
|
||||
augroup end
|
||||
]], false)
|
||||
|
||||
cmd('colorscheme gruvbox')
|
@@ -26,6 +26,7 @@ let g:compe.source.emoji = v:false
|
||||
|
||||
" NOTE: You can use other key to expand snippet.
|
||||
|
||||
|
||||
" Expand
|
||||
imap <expr> <C-j> vsnip#expandable() ? '<Plug>(vsnip-expand)' : '<C-j>'
|
||||
smap <expr> <C-j> vsnip#expandable() ? '<Plug>(vsnip-expand)' : '<C-j>'
|
||||
@@ -51,3 +52,50 @@ xmap S <Plug>(vsnip-cut-text)
|
||||
" let g:vsnip_filetypes = {}
|
||||
" let g:vsnip_filetypes.javascriptreact = ['javascript']
|
||||
" let g:vsnip_filetypes.typescriptreact = ['typescript']
|
||||
|
||||
lua << EOF
|
||||
local t = function(str)
|
||||
return vim.api.nvim_replace_termcodes(str, true, true, true)
|
||||
end
|
||||
|
||||
local check_back_space = function()
|
||||
local col = vim.fn.col('.') - 1
|
||||
if col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
-- Use (s-)tab to:
|
||||
--- move to prev/next item in completion menuone
|
||||
--- jump to prev/next snippet's placeholder
|
||||
_G.tab_complete = function()
|
||||
if vim.fn.pumvisible() == 1 then
|
||||
return t "<C-n>"
|
||||
elseif check_back_space() then
|
||||
return t "<Tab>"
|
||||
else
|
||||
return vim.fn['compe#complete']()
|
||||
end
|
||||
end
|
||||
_G.s_tab_complete = function()
|
||||
if vim.fn.pumvisible() == 1 then
|
||||
return t "<C-p>"
|
||||
else
|
||||
return t "<S-Tab>"
|
||||
end
|
||||
end
|
||||
|
||||
vim.api.nvim_set_keymap("i", "<Tab>", "v:lua.tab_complete()", {expr = true})
|
||||
vim.api.nvim_set_keymap("s", "<Tab>", "v:lua.tab_complete()", {expr = true})
|
||||
vim.api.nvim_set_keymap("i", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true})
|
||||
vim.api.nvim_set_keymap("s", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true})
|
||||
|
||||
--This line is important for auto-import
|
||||
vim.api.nvim_set_keymap('i', '<cr>', 'compe#confirm("<cr>")', { expr = true })
|
||||
vim.api.nvim_set_keymap('i', '<c-space>', 'compe#complete()', { expr = true })
|
||||
EOF
|
||||
|
||||
let g:vsnip_snippet_dir = expand('~/.config/nvim/vsnips')
|
||||
|
||||
|
@@ -13,6 +13,7 @@ call plug#begin('~/.config/nvim/autoload/plugged')
|
||||
|
||||
"Plug 'tpope/vim-sensible'
|
||||
Plug 'tpope/vim-fugitive'
|
||||
Plug 'mhinz/vim-signify'
|
||||
Plug 'tpope/vim-surround'
|
||||
Plug 'tpope/vim-repeat'
|
||||
|
||||
@@ -20,24 +21,28 @@ call plug#begin('~/.config/nvim/autoload/plugged')
|
||||
Plug 'christoomey/vim-tmux-navigator'
|
||||
Plug 'Yggdroot/indentLine'
|
||||
|
||||
" Plug 'SirVer/ultisnips'
|
||||
" Plug 'honza/vim-snippets'
|
||||
Plug 'neovim/nvim-lspconfig'
|
||||
Plug 'hrsh7th/nvim-compe'
|
||||
Plug 'hrsh7th/vim-vsnip'
|
||||
Plug 'hrsh7th/vim-vsnip-integ'
|
||||
Plug 'rafamadriz/friendly-snippets'
|
||||
|
||||
" Plug 'nvim-lua/completion-nvim'
|
||||
|
||||
Plug 'nvim-lua/popup.nvim'
|
||||
Plug 'nvim-lua/plenary.nvim'
|
||||
Plug 'nvim-telescope/telescope.nvim'
|
||||
|
||||
"Plug 'lervag/vimtex'
|
||||
Plug 'lervag/vimtex'
|
||||
|
||||
Plug 'SirVer/ultisnips'
|
||||
Plug 'honza/vim-snippets'
|
||||
" Highlight on Yank
|
||||
Plug 'machakann/vim-highlightedyank'
|
||||
" Autoclose parenthesis
|
||||
" Plug 'cohama/lexima.vim'
|
||||
Plug 'jiangmiao/auto-pairs'
|
||||
|
||||
Plug 'mhinz/vim-signify'
|
||||
Plug 'tpope/vim-fugitive'
|
||||
|
||||
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
||||
" Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
||||
|
||||
call plug#end()
|
||||
|
20
nvim/.config/nvim/vsnips/rst.json
Normal file
20
nvim/.config/nvim/vsnips/rst.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"image": {
|
||||
"prefix": "image",
|
||||
"body": [
|
||||
".. image:: $1",
|
||||
"\t:height: 200px",
|
||||
"\t:alt: $2",
|
||||
"$0"
|
||||
],
|
||||
"description": "Insert image"
|
||||
},
|
||||
"etape": {
|
||||
"prefix": ["etape", "étape"],
|
||||
"body": [
|
||||
"Étape ${1:1}: $2",
|
||||
"$0"
|
||||
],
|
||||
"description": "Insert image"
|
||||
}
|
||||
}
|
31
nvim/.config/nvim/vsnips/tex.json
Normal file
31
nvim/.config/nvim/vsnips/tex.json
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"tabular": {
|
||||
"prefix": "tabular",
|
||||
"body": [
|
||||
"\\\\begin{tabular}{$1}",
|
||||
"\\\\hline",
|
||||
"\t$0",
|
||||
"\\\\hline",
|
||||
"\\\\end{tabular}"
|
||||
],
|
||||
"description": "tabular"
|
||||
},
|
||||
"center": {
|
||||
"prefix": "center",
|
||||
"body": [
|
||||
"\\\\begin{center}",
|
||||
"\t$0",
|
||||
"\\\\end{center}"
|
||||
],
|
||||
"description": "center"
|
||||
},
|
||||
"minipage": {
|
||||
"prefix": "minipage",
|
||||
"body": [
|
||||
"\\\\begin{minipage}{${1:0.5}${2:\\\\linewidth}}",
|
||||
"\t$0",
|
||||
"\\\\end{minipage}"
|
||||
],
|
||||
"description": "minipage"
|
||||
}
|
||||
}
|
@@ -1,6 +1,6 @@
|
||||
session_name: enseignement
|
||||
start_directory: ~/Cours/2020-2021/Contenus/
|
||||
shell_command_before: source config.fish
|
||||
start_directory: ~/Cours/Current/Contenus/
|
||||
shell_command_before: source config.sh
|
||||
|
||||
windows:
|
||||
- window_name: Editor
|
||||
@@ -14,6 +14,5 @@ windows:
|
||||
- blank
|
||||
- vifm . .
|
||||
- window_name: Notes
|
||||
focus: true
|
||||
panes:
|
||||
- cd ../Notes
|
||||
|
Reference in New Issue
Block a user