From a66988a6e884273b13a12a85ab80dd08e8a7ce4a Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Fri, 13 Oct 2023 10:43:49 -0400 Subject: Lots of changes --- .config/nvim/UltiSnips/mail.snippets | 20 --- .config/nvim/after/plugin/colors.lua | 8 - .config/nvim/after/plugin/fugitive.lua | 1 - .config/nvim/after/plugin/harpoon.lua | 10 -- .config/nvim/after/plugin/lsp.lua | 4 - .config/nvim/after/plugin/orgmode.lua | 20 --- .config/nvim/after/plugin/telescope.lua | 7 - .config/nvim/after/plugin/treesitter.lua | 34 ----- .config/nvim/after/plugin/undotree.lua | 1 - .config/nvim/ftplugin/csv.vim | 0 .config/nvim/ftplugin/go.vim | 17 --- .config/nvim/ftplugin/python.vim | 0 .config/nvim/ftplugin/r.vim | 4 - .config/nvim/ftplugin/rmd.vim | 6 - .config/nvim/ftplugin/rnoweb.vim | 8 - .config/nvim/ftplugin/tex.vim | 0 .config/nvim/init.lua | 3 +- .config/nvim/init.vim | 244 ------------------------------- .config/nvim/lua/ben/init.lua | 3 - .config/nvim/lua/ben/packer.lua | 43 ------ .config/nvim/lua/ben/remap.lua | 2 - 21 files changed, 2 insertions(+), 433 deletions(-) delete mode 100644 .config/nvim/UltiSnips/mail.snippets delete mode 100644 .config/nvim/after/plugin/colors.lua delete mode 100644 .config/nvim/after/plugin/fugitive.lua delete mode 100644 .config/nvim/after/plugin/harpoon.lua delete mode 100644 .config/nvim/after/plugin/lsp.lua delete mode 100644 .config/nvim/after/plugin/orgmode.lua delete mode 100644 .config/nvim/after/plugin/telescope.lua delete mode 100644 .config/nvim/after/plugin/treesitter.lua delete mode 100644 .config/nvim/after/plugin/undotree.lua delete mode 100644 .config/nvim/ftplugin/csv.vim delete mode 100644 .config/nvim/ftplugin/go.vim delete mode 100644 .config/nvim/ftplugin/python.vim delete mode 100644 .config/nvim/ftplugin/r.vim delete mode 100644 .config/nvim/ftplugin/rmd.vim delete mode 100644 .config/nvim/ftplugin/rnoweb.vim delete mode 100644 .config/nvim/ftplugin/tex.vim delete mode 100755 .config/nvim/init.vim delete mode 100644 .config/nvim/lua/ben/init.lua delete mode 100644 .config/nvim/lua/ben/packer.lua delete mode 100644 .config/nvim/lua/ben/remap.lua (limited to '.config/nvim') diff --git a/.config/nvim/UltiSnips/mail.snippets b/.config/nvim/UltiSnips/mail.snippets deleted file mode 100644 index 352dd31..0000000 --- a/.config/nvim/UltiSnips/mail.snippets +++ /dev/null @@ -1,20 +0,0 @@ -snippet sig-en "English email signature" --Benjamin Chausse - ------------------ -~Website: chausse.xyz -~GPG Key: chausse.xyz/library/chaussebenjamin.asc -~Signal: (+1)-438-395-4349 ------------------ -endsnippet - -snippet sig-fr "Signature de courriel en français" --Benjamin Chausse - ------------------ -~Site web: chausse.xyz -~Clé gpg: chausse.xyz/library/chaussebenjamin.asc -~Signal: (+1)-438-395-4349 ------------------ -endsnippet - diff --git a/.config/nvim/after/plugin/colors.lua b/.config/nvim/after/plugin/colors.lua deleted file mode 100644 index 33e9aaf..0000000 --- a/.config/nvim/after/plugin/colors.lua +++ /dev/null @@ -1,8 +0,0 @@ -function ColorMyPencils(color) - color = color or "everforest" - vim.cmd.colorscheme(color) - vim.api.nvim_set_hl(0, "Normal", { bg = "none" }) - vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" }) -end - -ColorMyPencils() diff --git a/.config/nvim/after/plugin/fugitive.lua b/.config/nvim/after/plugin/fugitive.lua deleted file mode 100644 index 80c9070..0000000 --- a/.config/nvim/after/plugin/fugitive.lua +++ /dev/null @@ -1 +0,0 @@ -vim.keymap.set("n", "gs", vim.cmd.Git) diff --git a/.config/nvim/after/plugin/harpoon.lua b/.config/nvim/after/plugin/harpoon.lua deleted file mode 100644 index eed35ed..0000000 --- a/.config/nvim/after/plugin/harpoon.lua +++ /dev/null @@ -1,10 +0,0 @@ -local mark = require("harpoon.mark") -local ui = require("harpoon.ui") - -vim.keymap.set("n", "a", mark.add_file) -vim.keymap.set("n", "", ui.toggle_quick_menu) - -vim.keymap.set("n", "", function() ui.nav_file(1) end) -vim.keymap.set("n", "", function() ui.nav_file(2) end) -vim.keymap.set("n", "", function() ui.nav_file(3) end) -vim.keymap.set("n", "", function() ui.nav_file(4) end) diff --git a/.config/nvim/after/plugin/lsp.lua b/.config/nvim/after/plugin/lsp.lua deleted file mode 100644 index d39b467..0000000 --- a/.config/nvim/after/plugin/lsp.lua +++ /dev/null @@ -1,4 +0,0 @@ -local lsp = require('lsp-zero') - -lsp.preset("recomended") -lsp.setup() diff --git a/.config/nvim/after/plugin/orgmode.lua b/.config/nvim/after/plugin/orgmode.lua deleted file mode 100644 index d51a4d8..0000000 --- a/.config/nvim/after/plugin/orgmode.lua +++ /dev/null @@ -1,20 +0,0 @@ --- Load custom treesitter grammar for org filetype -require('orgmode').setup_ts_grammar() - --- Treesitter configuration -require('nvim-treesitter.configs').setup { - -- If TS highlights are not enabled at all, or disabled via `disable` prop, - -- highlighting will fallback to default Vim syntax highlighting - highlight = { - enable = true, - -- Required for spellcheck, some LaTex highlights and - -- code block highlights that do not have ts grammar - additional_vim_regex_highlighting = {'org'}, - }, - ensure_installed = {'org'}, -- Or run :TSUpdate org -} - -require('orgmode').setup({ - org_agenda_files = {'~/Dropbox/org/*', '~/my-orgs/**/*'}, - org_default_notes_file = '~/Dropbox/org/refile.org', -}) diff --git a/.config/nvim/after/plugin/telescope.lua b/.config/nvim/after/plugin/telescope.lua deleted file mode 100644 index d7b6471..0000000 --- a/.config/nvim/after/plugin/telescope.lua +++ /dev/null @@ -1,7 +0,0 @@ -local builtin = require('telescope.builtin') -vim.keymap.set('n', 'ff', builtin.find_files, {}) -vim.keymap.set('n', 'fg', builtin.git_files, {}) -vim.keymap.set('n', 'fb', builtin.buffers, {}) -vim.keymap.set('n', 'fh', builtin.help_tags, {}) -vim.keymap.set('n', 'fq', builtin.live_grep, {}) - diff --git a/.config/nvim/after/plugin/treesitter.lua b/.config/nvim/after/plugin/treesitter.lua deleted file mode 100644 index c24c5d7..0000000 --- a/.config/nvim/after/plugin/treesitter.lua +++ /dev/null @@ -1,34 +0,0 @@ -require'nvim-treesitter.configs'.setup { - -- A list of parser names, or "all" (the five listed parsers should always be installed) - ensure_installed = { "c", - "lua", - "vim", - "vimdoc", - "query", - "latex", - "bibtex", - "csv", - "diff", - "dockerfile", - "bash", - "org", - "go" - }, - - -- Install parsers synchronously (only applied to `ensure_installed`) - sync_install = false, - - -- Automatically install missing parsers when entering buffer - -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally - auto_install = true, - - highlight = { - enable = true, - - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = false, - }, -} diff --git a/.config/nvim/after/plugin/undotree.lua b/.config/nvim/after/plugin/undotree.lua deleted file mode 100644 index b6b9276..0000000 --- a/.config/nvim/after/plugin/undotree.lua +++ /dev/null @@ -1 +0,0 @@ -vim.keymap.set("n", "u", vim.cmd.UndotreeToggle) diff --git a/.config/nvim/ftplugin/csv.vim b/.config/nvim/ftplugin/csv.vim deleted file mode 100644 index e69de29..0000000 diff --git a/.config/nvim/ftplugin/go.vim b/.config/nvim/ftplugin/go.vim deleted file mode 100644 index 9d2ab4e..0000000 --- a/.config/nvim/ftplugin/go.vim +++ /dev/null @@ -1,17 +0,0 @@ -" Go deoplete -let g:deoplete#sources#go#gocode_binary = '$GOPATH/bin/gocode' -" GoRun Split Reuse -function! ReuseVimGoTerm(cmd) abort - for w in nvim_list_wins() - if "goterm" == nvim_buf_get_option(nvim_win_get_buf(w), 'filetype') - call nvim_win_close(w, v:true) - break - endif - endfor - execute a:cmd -endfunction -let g:go_term_enabled = 1 -let g:go_term_mode = "silent keepalt rightbelow 35 vsplit" -let g:go_def_reuse_buffer = 1 -autocmd FileType go nmap r :call ReuseVimGoTerm('GoRun') - diff --git a/.config/nvim/ftplugin/python.vim b/.config/nvim/ftplugin/python.vim deleted file mode 100644 index e69de29..0000000 diff --git a/.config/nvim/ftplugin/r.vim b/.config/nvim/ftplugin/r.vim deleted file mode 100644 index 309483b..0000000 --- a/.config/nvim/ftplugin/r.vim +++ /dev/null @@ -1,4 +0,0 @@ -" Nvim-R -let R_rconsole_width = 0 -let R_openpdf = 0 - diff --git a/.config/nvim/ftplugin/rmd.vim b/.config/nvim/ftplugin/rmd.vim deleted file mode 100644 index fae453d..0000000 --- a/.config/nvim/ftplugin/rmd.vim +++ /dev/null @@ -1,6 +0,0 @@ -" Nvim-R -let R_rconsole_width = 0 -let R_openpdf = 0 -au BufWritePost *.rmd silent! :call RWeave("nobib", 1, 1) -au VimLeave *.rmd !texclear % - diff --git a/.config/nvim/ftplugin/rnoweb.vim b/.config/nvim/ftplugin/rnoweb.vim deleted file mode 100644 index f4b7453..0000000 --- a/.config/nvim/ftplugin/rnoweb.vim +++ /dev/null @@ -1,8 +0,0 @@ -autocmd BufEnter * :UltiSnipsAddFiletypes tex.r - -" Nvim-R -let R_rconsole_width = 0 -let R_openpdf = 0 -au BufWritePost *.rnw, silent! :call RWeave("nobib", 1, 1) -au VimLeave *.rnw !texclear % - diff --git a/.config/nvim/ftplugin/tex.vim b/.config/nvim/ftplugin/tex.vim deleted file mode 100644 index e69de29..0000000 diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 32d840c..3465962 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -1 +1,2 @@ -require("ben") +require("ben.core") +require("ben.lazy") diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim deleted file mode 100755 index d7d3f0a..0000000 --- a/.config/nvim/init.vim +++ /dev/null @@ -1,244 +0,0 @@ -" _ -" (_) -" __ ___ _ __ ___ _ __ ___ -" \ \ / / | '_ ` _ \| '__/ __| -" \ V /| | | | | | | | | (__ -" \_/ |_|_| |_| |_|_| \___| -" -" - -" Vim Plug {{{ - -" Plug Autoinstall {{{ -if ! filereadable(system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/plug.vim"')) - echo "Downloading junegunn/vim-plug to manage plugins..." - silent !mkdir -p ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/ - silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/plug.vim - autocmd VimEnter * PlugInstall -endif -" }}} - -" Plugins -call plug#begin() -" Bracket Completion -Plug 'jiangmiao/auto-pairs' -" Automated vim bulletpoints -Plug 'dkarter/bullets.vim' -" Vim css hex highlight -Plug 'chrisbra/Colorizer' -" Deoplete -Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } -" LaTeX deoplete -Plug 'hisaknown/deoplete-latex' -" Todoist with vim? -Plug 'romgrk/todoist.nvim', { 'do': ':TodoistInstall' } -" Minimal writing environment -Plug 'junegunn/goyo.vim' -" markdown preview vim -Plug 'iamcco/markdown-preview.nvim' -" Nice markdown formatting -Plug 'godlygeek/tabular', { 'for': 'markdown' } -Plug 'plasticboy/vim-markdown', { 'for': 'markdown' } -" Generate buffers -Plug 'AndrewRadev/bufferize.vim' -" Emmet -Plug 'mattn/emmet-vim', { 'for': [ 'markdown', 'html' ] } -" html preview -Plug 'turbio/bracey.vim', { 'for': [ 'html', 'stylesheet', 'javascript'] } -" My colorscheme -Plug 'ChausseBenjamin/friffle-vim' -" Elly colorscheme -Plug 'ryuta69/elly.vim' -" Vim Fugitive -Plug 'tpope/vim-fugitive' -" Vim-Surround -Plug 'tpope/vim-surround' -" Vim repeat for dot command on vim surround -Plug 'tpope/vim-repeat' -" Vimtex -Plug 'lervag/vimtex', { 'for': ['tex', 'aux', 'bib'] } -" Commentary -Plug 'tpope/vim-commentary' -" Vim snippet manager/tool -Plug 'sirver/UltiSnips' -" Vim snippet library -Plug 'honza/vim-snippets' -" French grammar checker -Plug 'dpelle/vim-Grammalecte' -" All purpose grammar checker -Plug 'dpelle/vim-LanguageTool' -" sxhkd syntax -Plug 'kovetskiy/sxhkd-vim', { 'for': 'sxhkdrc' } -" Google cal inside vim -Plug 'itchyny/calendar.vim' -" Turning vim into an R IDE -Plug 'jalvesaq/Nvim-R', { 'for': [ 'R', 'Rnoweb', 'tex', 'aux', 'bib' ] } -" csv filetype for vim -Plug 'chrisbra/csv.vim' -" Quick highlighting -Plug 'qxxxb/vim-searchhi' -" Split resizing made easy -Plug 'simeji/winresizer' -call plug#end() -" }}} -" Sensible defaults {{{ -" Aesthetics & basics -syntax on -colo friffle -" colorscheme tweaks {{{ -hi Normal guibg=NONE -hi CursorLineNr guibg=NONE -hi Constant guibg=NONE -hi Conceal guibg=NONE -hi Folded guibg=NONE -hi ColorColumn guibg='#738c9c' -hi Todo guibg='#acb3b5' guifg='#340001' -hi Search guifg='#810002' guibg='#738c9c' -" }}} -" weird Goyo behavior fix {{{ -au User GoyoEnter,GoyoLeave hi Normal guibg=NONE -au User GoyoEnter,GoyoLeave hi StatusLineNC guibg=NONE -au User GoyoEnter,GoyoLeave hi StatusLine guibg=NONE -au User GoyoEnter,GoyoLeave hi VertSplit guibg=NONE -" }}} -set tgc " Use my terminal's colors -set lz " Lazy redraw -> Quicker vim -set t_Co=256 " 256 colors -set enc=utf-8 -set wmnu " Display all matching file when we tab complete -set nosc " Don't show the previously typed command -set nu rnu " Ablolute Relative number hybrid -set ru " View column count -set ls=0 " Disable the statusline -set sb spr " Sensible split directions -set ts=2 " A sensible tab width -set shiftwidth=2 " A sensible tab width -set et " Expanding tabs -set foldmethod=marker " vim folding - -" Completion -set path+=** " Provides tab-completion for all file related tasks -set wim=longest,list,full " set completion mode -set runtimepath+=~/.config/nvim/plugged/deoplete.nvim -let g:deoplete#enable_at_startup = 1 - -" Wrapping -set wrap -set lbr - -" Custom semicolon leader -let mapleader=";" -" Tab space for quick commands -nnoremap : - -" Spelling -set complete+=kspell " Better Spell Checking -set spl=fr " French prose - -" Tag Editing -inoremap t <++> -inoremap : /<++>"_c4l - -" Quickly save -nnoremap w :update - -" Logical way to Y ank -nnoremap Y y$ - -" Easily escape terminal mode -tnoremap - -" Split motion -nnoremap h -nnoremap j -nnoremap k -nnoremap l - -" Saving and quitting buffers -nnoremap ZF ZQ -nnoremap w :update - -" Remove trailing white spaces -autocmd BufWritePre * %s/\s\+$//e - -" }}} -" Workflow specific {{{ - -" 'o'pen pdf for the current document -nnoremap o :!opout % -nnoremap c :update \| :!compiler % -nnoremap r :update \| :!compiler % \| :!sage %:r.sagetex.sage && compiler % - -" Auto-enable Goyo for certain filetypes -au filetype mail,todoist Goyo - -" }}} -" Plugin related {{{ - -" Todoist.nvim -let todoist = { -\ 'icons': { -\ 'unchecked': ' ', -\ 'checked': ' ', -\ 'loading': ' ', -\ 'error': ' ', -\ }, -\} - -" Markdown syntax -let g:vim_markdown_strikethrough = 1 -let g:vim_markdown_folding_disabled = 1 -set conceallevel=2 - -" Bufferize -let g:bufferize_command = 'vnew' - -" Bracey -let g:bracey_browser_command = "firefox" - -" Grammalecte -let g:grammalecte_cli_py = "/usr/bin/grammalecte-cli" - -" Calendar.vim -let g:calendar_google_calendar = 1 -let g:calendar_frame = 'default' -source ~/.cache/calendar.vim/credentials.vim - -" Emmet.vim -let g:user_emmet_leader_key=',' - -" Vimtex -" pdf viewer - let g:vimtex_view_general_viewer = 'open' - let g:vimtex_view_general_options = '-a zathura' - let g:tex_flavor = 'latex' -" TOC - nnoremap :VimtexTocToggle -" Underscore errors - let g:tex_no_error=1 - -" Nvim-R -" Folding - let r_syntax_folding = 1 - set foldnestmax=1 - set foldmethod=marker -" Follow colorscheme - let rout_follow_colorscheme = 0 - -" Arduino -let g:arduino_cmd = '/usr/bin/arduino' -let g:arduino_dir = '/usr/share/arduino' - -" Ultisnips -let g:UltiSnipsExpandTrigger="" -let g:UltiSnipsJumpForwardTrigger=";" -let g:UltiSnipsJumpBackwardTrigger=";n" - " If you want :UltiSnipsEdit to split your window. -let g:UltiSnipsEditSplit="vertical" -" Snippet directory -let g:UltiSnipsSnippetDirectories=[$HOME.'/.config/nvim/UltiSnips'] - -" }}} - -" See immediate results when edditing this file -autocmd BufWritePost ~/.config/nvim/init.vim :source % diff --git a/.config/nvim/lua/ben/init.lua b/.config/nvim/lua/ben/init.lua deleted file mode 100644 index f774278..0000000 --- a/.config/nvim/lua/ben/init.lua +++ /dev/null @@ -1,3 +0,0 @@ -require("ben.remap") -require("ben.packer") - diff --git a/.config/nvim/lua/ben/packer.lua b/.config/nvim/lua/ben/packer.lua deleted file mode 100644 index c17f4e2..0000000 --- a/.config/nvim/lua/ben/packer.lua +++ /dev/null @@ -1,43 +0,0 @@ ----Only required if you have packer configured as `opt` -vim.cmd [[packadd packer.nvim]] - -return require('packer').startup(function(use) - -- Packer can manage itself - use 'wbthomason/packer.nvim' - use { - 'nvim-telescope/telescope.nvim', tag = '0.1.3', - -- or , branch = '0.1.x', - requires = { {'nvim-lua/plenary.nvim'} } - } - use({ - 'sainnhe/everforest', - config = function() - vim.cmd('colorscheme everforest') - end - }) - use ('ChausseBenjamin/friffle-vim') - use('nvim-treesitter/nvim-treesitter', {run = ':TSUpdate'}) - use('theprimeagen/harpoon') - use('mbbill/undotree') - use('tpope/vim-fugitive') - use('tpope/vim-surround') - use { - 'VonHeikemen/lsp-zero.nvim', - branch = 'v2.x', - requires = { - -- LSP Support - {'neovim/nvim-lspconfig'}, -- Required - {'williamboman/mason.nvim'}, -- Optional - {'williamboman/mason-lspconfig.nvim'}, -- Optional - -- Autocompletion - {'hrsh7th/nvim-cmp'}, -- Required - {'hrsh7th/cmp-nvim-lsp'}, -- Required - {'L3MON4D3/LuaSnip'}, -- Required - } - } - use {'nvim-treesitter/nvim-treesitter'} - use {'nvim-orgmode/orgmode', config = function() - require('orgmode').setup{} - end} - use ('github/copilot.nvim') -end) diff --git a/.config/nvim/lua/ben/remap.lua b/.config/nvim/lua/ben/remap.lua deleted file mode 100644 index b760350..0000000 --- a/.config/nvim/lua/ben/remap.lua +++ /dev/null @@ -1,2 +0,0 @@ -vim.g.mapleader = " " -vim.keymap.set("n", "pv", vim.cmd.Ex) -- cgit v1.2.3