summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.config/alacritty/alacritty.yml2
-rw-r--r--.config/nvim/after/plugin/asyncomplete.lua13
-rw-r--r--.config/nvim/after/plugin/org.lua4
-rw-r--r--.config/nvim/after/plugin/quickscope.lua7
-rw-r--r--.config/nvim/init.lua3
-rw-r--r--.config/nvim/lua/bindings.lua4
-rw-r--r--.config/nvim/lua/plug.lua140
-rw-r--r--.config/nvim/lua/settings.lua2
-rw-r--r--.config/nvim/lua/sidebars.lua39
9 files changed, 91 insertions, 123 deletions
diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml
index 9a0ba26..d9787cb 100644
--- a/.config/alacritty/alacritty.yml
+++ b/.config/alacritty/alacritty.yml
@@ -83,7 +83,7 @@ window:
#
# Window opacity as a floating point number from `0.0` to `1.0`.
# The value `0.0` is completely transparent and `1.0` is opaque.
- opacity: 0.90
+ opacity: 0.92
scrolling:
# Maximum number of lines in the scrollback buffer.
diff --git a/.config/nvim/after/plugin/asyncomplete.lua b/.config/nvim/after/plugin/asyncomplete.lua
deleted file mode 100644
index da28c37..0000000
--- a/.config/nvim/after/plugin/asyncomplete.lua
+++ /dev/null
@@ -1,13 +0,0 @@
-vim.cmd [[
-autocmd User asyncomplete_setup call asyncomplete#register_source(
- \ asyncomplete#sources#clang#get_source_options({
- \ 'config': {
- \ 'clang_path': '/usr/bin/cc',
- \ 'clang_args': {
- \ 'default': ['-I/usr/include'],
- \ 'c': ['-std=c89', '-I/usr/include'],
- \ 'cpp': ['-std=c++98', '-I/usr/include']
- \ }
- \ }
- \ }))
-]]
diff --git a/.config/nvim/after/plugin/org.lua b/.config/nvim/after/plugin/org.lua
deleted file mode 100644
index 662ad08..0000000
--- a/.config/nvim/after/plugin/org.lua
+++ /dev/null
@@ -1,4 +0,0 @@
--- Org-mode
-vim.g.org_todo_keywords = { 'TODO', '|', 'DONE', 'CANCELED' }
-vim.g.org_export_emacs = "/usr/bin/emacs"
-
diff --git a/.config/nvim/after/plugin/quickscope.lua b/.config/nvim/after/plugin/quickscope.lua
deleted file mode 100644
index e024bba..0000000
--- a/.config/nvim/after/plugin/quickscope.lua
+++ /dev/null
@@ -1,7 +0,0 @@
--- Quickscope
--- vim.g.qs_highlight_on_keys = { 'f', 'F', 't', 'T' }
--- vim.g.qs_max_chars=150
--- vim.cmd [[
--- highlight QuickScopePrimary guifg='#00C7DF' gui=underline ctermfg=155 cterm=underline
--- highlight QuickScopeSecondary guifg='#afff5f' gui=underline ctermfg=81 cterm=underline
--- ]]
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua
index 0fd5fe9..59f1704 100644
--- a/.config/nvim/init.lua
+++ b/.config/nvim/init.lua
@@ -11,12 +11,11 @@
-- == ===== ==== ==
-- ========================
-confdir = os.getenv('XDG_CONFIG_HOME')
+Confdir = os.getenv('XDG_CONFIG_HOME')
vim.cmd('set runtimepath^=/home/r_bousset/.config/nvim runtimepath+=/home/jozan/.config/nvim/after')
vim.cmd('let &packpath = &runtimepath')
require('plug')
require('settings')
require('bindings')
-require('sidebars')
require('langs')
diff --git a/.config/nvim/lua/bindings.lua b/.config/nvim/lua/bindings.lua
index ef46c71..06022d1 100644
--- a/.config/nvim/lua/bindings.lua
+++ b/.config/nvim/lua/bindings.lua
@@ -16,6 +16,10 @@ vim.keymap.set('n', '*', '*zz', { noremap = true, silent = false })
vim.keymap.set('i', '<C-j>', 'pumvisible() ? "<C-n>" : "<C-j>"', { expr = true })
vim.keymap.set('i', '<C-k>', 'pumvisible() ? "<C-p>" : "<C-k>"', { expr = true })
vim.keymap.set('i', '<CR>', 'pumvisible() ? asyncomplete#close_popup() : "\\<cr>"', { expr = true })
+vim.keymap.set('n', '<F2>', vim.cmd.NvimTreeToggle, { noremap = true, silent = true })
+vim.keymap.set('n', '<F4>', ':make<space>-j5<space>', { noremap = true, silent = false })
+vim.keymap.set('n', '<F3>', vim.cmd.TroubleToggle, { noremap = true, silent = true })
+vim.keymap.set('n', '<F5>', vim.cmd.UndotreeToggle, { noremap = true, silent = true })
vim.g.floaterm_keymap_toggle = '<F1>'
vim.g.floaterm_keymap_prev = '<F11>'
vim.g.floaterm_keymap_next = '<F12>'
diff --git a/.config/nvim/lua/plug.lua b/.config/nvim/lua/plug.lua
index 82143a9..cfff4a5 100644
--- a/.config/nvim/lua/plug.lua
+++ b/.config/nvim/lua/plug.lua
@@ -1,60 +1,86 @@
-local Plug = vim.fn['plug#']
+vim.cmd.packadd('packer.nvim')
-vim.call('plug#begin', os.getenv("XDG_DATA_HOME") .. '/nvim/plugged')
+return require('packer').startup({function(use)
+ -- Packer can manage itself
+ use 'wbthomason/packer.nvim'
+ use {
+ 'nvim-telescope/telescope.nvim',
+ branch = '0.1.x',
+ requires = { {'nvim-lua/plenary.nvim'} }
+ }
+ use {
+ 'windwp/nvim-autopairs',
+ config = function() require('nvim-autopairs').setup {} end
+ }
+ use 'jiangmiao/auto-pairs'
+ use 'folke/which-key.nvim'
+ use 'mhinz/vim-signify'
+ use 'mhinz/vim-startify'
+ use 'morhetz/gruvbox'
+ use 'mg979/vim-visual-multi'
+ use 'preservim/tagbar'
+ use 'preservim/nerdcommenter'
+ use {
+ 'nvim-tree/nvim-tree.lua',
+ requires = {'nvim-tree/nvim-web-devicons'}
+ }
+ use 'mbbill/undotree'
+ -- use 'brglng/vim-sidebar-manager'
+ use 'sainnhe/gruvbox-material'
+ use 'tpope/vim-fugitive'
+ use 'tpope/vim-surround'
+ use 'nvim-lualine/lualine.nvim'
+ use 'voldikss/vim-floaterm'
+ use 'chrisbra/csv.vim'
+ use {
+ 'ThePrimeagen/harpoon',
+ branch = 'harpoon2',
+ requires = { {'nvim-lua/plenary.nvim'} }
+ }
+ use 'HiPhish/rainbow-delimiters.nvim'
+ use {
+ 'nvim-treesitter/nvim-treesitter',
+ run = function()
+ local ts_update = require('nvim-treesitter.install').update({ with_sync = true })
+ ts_update()
+ end,}
+ use {
+ 'VonHeikemen/lsp-zero.nvim',
+ branch = 'v3.x',
+ requires = {
+ -- LSP Support
+ {'neovim/nvim-lspconfig'},
+ {'williamboman/mason.nvim'},
+ {'williamboman/mason-lspconfig.nvim'},
-Plug('ap/vim-css-color')
-Plug('brglng/vim-sidebar-manager')
-Plug('dag/vim-fish')
--- Plug('jackguo380/vim-lsp-cxx-highlight')
-Plug('jceb/vim-orgmode')
-Plug('jiangmiao/auto-pairs')
--- Plug('junegunn/fzf')
--- Plug('junegunn/fzf.vim')
--- Plug('voldikss/fzf-floaterm')
-Plug('folke/which-key.nvim')
-Plug('mbbill/undotree')
-Plug('mhinz/vim-signify')
-Plug('mhinz/vim-startify')
-Plug('morhetz/gruvbox')
-Plug('mg979/vim-visual-multi')
-Plug('prabirshrestha/async.vim')
-Plug('prabirshrestha/asyncomplete.vim')
-Plug('keremc/asyncomplete-clang.vim')
-Plug('prabirshrestha/vim-lsp')
-Plug('preservim/tagbar')
-Plug('preservim/nerdcommenter')
-Plug('preservim/nerdtree')
-Plug('ryanoasis/vim-devicons')
-Plug('nvim-tree/nvim-web-devicons')
-Plug('sainnhe/gruvbox-material')
-Plug('tpope/vim-dispatch')
-Plug('tpope/vim-fugitive')
-Plug('tpope/vim-speeddating')
-Plug('tpope/vim-surround')
--- Plug('unblevable/quick-scope')
-Plug('vifm/vifm.vim')
--- Plug('vim-airline/vim-airline')
--- Plug('vim-airline/vim-airline-themes')
-Plug('nvim-lualine/lualine.nvim')
-Plug('folke/trouble.nvim')
-Plug('vim-scripts/grep.vim')
-Plug('voldikss/vim-floaterm')
-Plug('chrisbra/csv.vim')
-Plug('nvim-telescope/telescope.nvim')
-Plug('nvim-lua/plenary.nvim')
-Plug('ThePrimeagen/harpoon', {['branch'] = 'harpoon2'})
-Plug('HiPhish/rainbow-delimiters.nvim')
-Plug('nvim-treesitter/nvim-treesitter', {['do'] = ':TSUpdate'})
--- Uncomment these if you want to manage LSP servers from neovim
- Plug('williamboman/mason.nvim')
- Plug('williamboman/mason-lspconfig.nvim')
--- LSP Support
-Plug('neovim/nvim-lspconfig')
--- Autocompletion
-Plug('hrsh7th/nvim-cmp')
-Plug('hrsh7th/cmp-nvim-lsp')
-Plug('L3MON4D3/LuaSnip')
-Plug('VonHeikemen/lsp-zero.nvim', {['branch'] = 'v3.x'})
-Plug('onsails/lspkind.nvim')
+ -- Autocompletion
+ {'hrsh7th/nvim-cmp'},
+ {'hrsh7th/cmp-buffer'},
+ {'hrsh7th/cmp-path'},
+ {'saadparwaiz1/cmp_luasnip'},
+ {'hrsh7th/cmp-nvim-lsp'},
+ {'hrsh7th/cmp-nvim-lua'},
-vim.call('plug#end')
+ -- Snippets
+ {'L3MON4D3/LuaSnip'},
+ {'rafamadriz/friendly-snippets'},
+ }
+ }
+ use({
+ 'folke/trouble.nvim',
+ requires = {
+ {'nvim-tree/nvim-web-devicons'},
+ },
+ config = function()
+ require('trouble').setup {
+ icons = true,
+ }
+ end
+ })
+ use 'onsails/lspkind.nvim'
+end,
+config = {
+ display = {
+ open_fn = require('packer.util').float,
+ }
+}})
diff --git a/.config/nvim/lua/settings.lua b/.config/nvim/lua/settings.lua
index d311104..a7374ca 100644
--- a/.config/nvim/lua/settings.lua
+++ b/.config/nvim/lua/settings.lua
@@ -1,3 +1,5 @@
+vim.g.loaded_netrw = 1
+vim.g.loaded_netrwPlugin = 1
vim.opt.autochdir = false
vim.opt.bg = 'dark'
vim.opt.cindent = true
diff --git a/.config/nvim/lua/sidebars.lua b/.config/nvim/lua/sidebars.lua
deleted file mode 100644
index 796a21d..0000000
--- a/.config/nvim/lua/sidebars.lua
+++ /dev/null
@@ -1,39 +0,0 @@
-vim.g.NERDTreeWinPos = 'left'
-vim.g.NERDTreeWinSize = 30
-vim.g.NERDTreeQuitOnOpen = 0
-vim.g.tagbar_left = 1
-vim.g.tagbar_width = 30
-vim.g.tagbar_autoclose = 0
-vim.g.tagbar_autofocus = 1
-vim.g.tagbar_sort = 0
-vim.g.undotree_SetFocusWhenToggle = 1
-vim.g.undotree_SplitWidth = 30
-
-vim.cmd [[
-let g:sidebars = {
- \ 'nerdtree': {
- \ 'position': 'left',
- \ 'check_win': {nr -> getwinvar(nr, '&filetype') ==# 'nerdtree'},
- \ 'open': 'NERDTree',
- \ 'close': 'NERDTreeClose'
- \ },
- \ 'tagbar': {
- \ 'position': 'left',
- \ 'check_win': {nr -> bufname(winbufnr(nr)) =~ '__Tagbar__'},
- \ 'open': 'TagbarOpen',
- \ 'close': 'TagbarClose'
- \ },
- \ 'undotree': {
- \ 'position': 'left',
- \ 'check_win': {nr -> getwinvar(nr, '&filetype') ==# 'undotree'},
- \ 'open': 'UndotreeShow',
- \ 'close': 'UndotreeHide'
- \ }
- \ }
-let g:startify_session_before_save = ['call sidebar#close_all()']
-]]
-
-vim.keymap.set('n', '<F2>', ':call sidebar#toggle("nerdtree")<CR>', { noremap = true, silent = true })
-vim.keymap.set('n', '<F4>', ':make<space>-j5<space>', { noremap = true, silent = false })
-vim.keymap.set('n', '<F3>', ':call sidebar#toggle("tagbar")<CR>', { noremap = true, silent = true })
-vim.keymap.set('n', '<F5>', vim.cmd.UndotreeToggle, { noremap = true, silent = true })