Update init.vim
This commit is contained in:
parent
be50c7ee96
commit
61988e3afb
@ -1,6 +1,6 @@
|
||||
let mapleader=" "
|
||||
syntax on
|
||||
set list
|
||||
syntax on
|
||||
let g:html_indent_script1 = "inc"
|
||||
let g:html_indent_style1 = "inc"
|
||||
set relativenumber
|
||||
@ -24,33 +24,35 @@ set updatetime=50
|
||||
set shortmess+=c
|
||||
|
||||
call plug#begin('~/.vim/plugged')
|
||||
Plug 'gruvbox-community/gruvbox'
|
||||
" Plug 'colepeters/spacemacs-theme.vim'
|
||||
Plug 'sainnhe/gruvbox-material'
|
||||
" Plug 'phanviet/vim-monokai-pro'
|
||||
Plug 'vim-airline/vim-airline'
|
||||
Plug 'flazz/vim-colorschemes'
|
||||
Plug 'ap/vim-css-color'
|
||||
Plug 'airblade/vim-rooter'
|
||||
Plug 'gruvbox-community/gruvbox'
|
||||
" Plug 'colepeters/spacemacs-theme.vim'
|
||||
Plug 'sainnhe/gruvbox-material'
|
||||
" Plug 'phanviet/vim-monokai-pro'
|
||||
Plug 'vim-airline/vim-airline'
|
||||
Plug 'flazz/vim-colorschemes'
|
||||
Plug 'ap/vim-css-color'
|
||||
Plug 'airblade/vim-rooter'
|
||||
|
||||
" Telescope
|
||||
Plug 'nvim-lua/plenary.nvim'
|
||||
Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.2' }
|
||||
Plug 'ThePrimeagen/harpoon'
|
||||
" Telescope
|
||||
Plug 'nvim-lua/plenary.nvim'
|
||||
Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.2' }
|
||||
Plug 'ThePrimeagen/harpoon'
|
||||
Plug 'nvim-telescope/telescope-live-grep-args.nvim'
|
||||
|
||||
" LSP Support
|
||||
Plug 'neovim/nvim-lspconfig' " Required
|
||||
Plug 'williamboman/mason.nvim', " Optional
|
||||
Plug 'williamboman/mason-lspconfig.nvim' " Optional
|
||||
" LSP Support
|
||||
Plug 'neovim/nvim-lspconfig' " Required
|
||||
Plug 'williamboman/mason.nvim', " Optional
|
||||
Plug 'williamboman/mason-lspconfig.nvim' " Optional
|
||||
|
||||
" Autocompletion
|
||||
Plug 'hrsh7th/nvim-cmp' " Required
|
||||
Plug 'hrsh7th/cmp-nvim-lsp' " Required
|
||||
Plug 'L3MON4D3/LuaSnip' " Required
|
||||
" Autocompletion
|
||||
Plug 'hrsh7th/nvim-cmp' " Required
|
||||
Plug 'hrsh7th/cmp-nvim-lsp' " Required
|
||||
Plug 'L3MON4D3/LuaSnip' " Required
|
||||
|
||||
Plug 'VonHeikemen/lsp-zero.nvim', {'branch': 'v2.x'}
|
||||
Plug 'stevearc/oil.nvim'
|
||||
Plug 'VonHeikemen/lsp-zero.nvim', {'branch': 'v2.x'}
|
||||
|
||||
Plug 'praem90/nvim-phpcsf'
|
||||
Plug 'praem90/nvim-phpcsf'
|
||||
|
||||
call plug#end()
|
||||
|
||||
@ -64,7 +66,14 @@ augroup PHBSCF
|
||||
augroup END
|
||||
|
||||
|
||||
nnoremap <Esc> :noh<CR>
|
||||
noremap <C-i> <Nop>
|
||||
|
||||
" Remapper Ctrl+O pour aller au fichier précédent dans l'historique
|
||||
nnoremap <C-o> :bprevious<CR>
|
||||
|
||||
" Remapper Ctrl+I pour aller au fichier suivant dans l'historique
|
||||
nnoremap <C-i> :bnext<CR>
|
||||
" Theme
|
||||
let g:gruvbox_invert_selection='0'
|
||||
set background=dark
|
||||
@ -74,7 +83,7 @@ let g:rooter_patterns = ['Makefile', '*.sln', 'build/env.sh', 'deploy.sh']
|
||||
|
||||
" Telescope
|
||||
nnoremap <leader>ff <cmd>Telescope find_files<cr>
|
||||
nnoremap <leader>fg <cmd>Telescope live_grep<cr>
|
||||
nnoremap <leader>fg <cmd>lua require('telescope').extensions.live_grep_args.live_grep_args()<cr>
|
||||
nnoremap <leader>fb <cmd>Telescope buffers<cr>
|
||||
nnoremap <leader>fh <cmd>Telescope help_tags<cr>
|
||||
|
||||
@ -83,16 +92,28 @@ nnoremap <leader>a <cmd>lua require("harpoon.mark").add_file()<cr>
|
||||
nnoremap <leader><leader> <cmd>:lua require("harpoon.ui").toggle_quick_menu()<cr>
|
||||
|
||||
" Fichier
|
||||
nnoremap <C-p> :Explore %:h<CR>
|
||||
" Fonction pour ouvrir Dolphin dans le répertoire du fichier courant
|
||||
function! OpenDolphin()
|
||||
let l:current_file = expand('%:p')
|
||||
let l:current_directory = fnamemodify(l:current_file, ':p:h')
|
||||
silent execute "!dolphin" shellescape(l:current_directory)
|
||||
endfunction
|
||||
|
||||
" Associez la fonction OpenDolphin à la combinaison de touches Ctrl+P
|
||||
nnoremap <C-S-P> :call OpenDolphin()<CR>
|
||||
|
||||
lua<<OEF
|
||||
|
||||
require("oil").setup()
|
||||
vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory" })
|
||||
|
||||
local lsp = require('lsp-zero').preset({})
|
||||
|
||||
|
||||
lsp.on_attach(function(client, bufnr)
|
||||
-- see :help lsp-zero-keybindings
|
||||
-- to learn the available actions
|
||||
lsp.default_keymaps({buffer = bufnr})
|
||||
-- see :help lsp-zero-keybindings
|
||||
-- to learn the available actions
|
||||
lsp.default_keymaps({buffer = bufnr})
|
||||
end)
|
||||
|
||||
lsp.setup()
|
||||
@ -102,7 +123,7 @@ local cmp = require('cmp')
|
||||
local cmp_action = require('lsp-zero').cmp_action()
|
||||
|
||||
cmp.setup({
|
||||
mapping = {
|
||||
mapping = {
|
||||
-- `Enter` key to confirm completion
|
||||
['<CR>'] = cmp.mapping.confirm({select = false}),
|
||||
|
||||
@ -126,5 +147,6 @@ cmp.setup({
|
||||
fallback()
|
||||
end
|
||||
end
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user