commit 0c069a8bc2c361b971a1b4b09b07fe3846f2d091
parent 331dd8a40728dd7e903334499931e931cf4cb06c
Author: Thomas Vigouroux <tomvig38@gmail.com>
Date: Wed, 14 Apr 2021 16:21:44 +0200
Fix and tidy configuration
Diffstat:
13 files changed, 34 insertions(+), 436 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -1 +1,3 @@
spell
+plugin/packer_compiled.vim
+parser/
diff --git a/after/plugin/config/completion.vim b/after/plugin/config/completion.vim
@@ -1,4 +1,4 @@
-" Last Change: 2021 Jan 11
+" Last Change: 2021 Apr 13
if !exists('g:loaded_completion')
finish
@@ -19,7 +19,7 @@ let g:completion_chain_complete_list = {
\ {'complete_items': ['lsp', 'snippet']},
\ ],
\'lua' : [
- \ {'complete_items': ['ts', 'snippet']}
+ \ {'complete_items': ['snippet']}
\ ],
\'mem' : [
\ {'complete_items': ['ts', 'snippet']}
diff --git a/after/plugin/config/nvim-lsp.vim b/after/plugin/config/nvim-lsp.vim
@@ -1,7 +1,7 @@
" Last Change: 2020 Nov 27
" Utility to store lsp/completion config
-lua require'lsp-config'
+lua require'lsp_config'
nnoremap <silent> <Leader>d <cmd>lua vim.lsp.buf.definition()<CR>
nnoremap <silent> gD <cmd>lua vim.lsp.buf.implementation()<CR>
diff --git a/after/plugin/config/nvim-treesitter.vim b/after/plugin/config/nvim-treesitter.vim
@@ -1,14 +1,10 @@
-" Last Change: 2020 Nov 23
+" Last Change: 2021 Apr 12
if !exists('g:loaded_nvim_treesitter')
finish
endif
-lua require'ts-config'
-
-" hi! link TSParameter DraculaOrangeItalic
-" hi! link TSFuncBuiltin DraculaCyan
-" hi! link TSKeywordFunction Function
+lua require'ts_config'
hi! link TSStrong Type
hi! link TSEmphasis markdownBold
diff --git a/lua/lsp-config.lua b/lua/lsp_config.lua
diff --git a/lua/plugins.lua b/lua/plugins.lua
@@ -36,7 +36,7 @@ return require"packer".startup(function(use)
'nvim-telescope/telescope-fzy-native.nvim'
},
config = function()
- require'tele-config'
+ require'tele_config'
end
}
diff --git a/lua/tele-config.lua b/lua/tele_config.lua
diff --git a/lua/ts-config.lua b/lua/ts-config.lua
@@ -1,52 +0,0 @@
-local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
-parser_config.vim = {
- install_info = {
- url = "~/projects/ts/tree-sitter-viml", -- local path or git repo
- files = {"src/parser.c", "src/scanner.c"}
- },
-}
-
-require'nvim-treesitter.configs'.setup {
- highlight = {
- enable = true, -- false will disable the whole extension
- -- use_languagetree = true,
- disable = {}, -- list of language that will be disabled
- },
- incremental_selection = {
- enable = true,
- disable = {},
- keymaps = { -- mappings for incremental selection (visual mappings)
- init_selection = 'gnn', -- maps in normal mode to init the node/scope selection
- node_incremental = "grn", -- increment to the upper named parent
- scope_incremental = "grc", -- increment to the upper scope (as defined in locals.scm)
- node_decremental = "grm", -- decrement to the previous node
- }
- },
- indent = {
- enable = true,
- disable = { 'c' }
- },
- refactor = {
- highlight_definitions = {
- enable = true
- },
- highlight_current_scope = {
- enable = true
- },
- smart_rename = {
- enable = false,
- keymaps = {
- smart_rename = "grr" -- mapping to rename reference under cursor
- }
- },
- navigation = {
- enable = false,
- keymaps = {
- goto_definition = "gnd", -- mapping to go to definition of symbol under cursor
- list_definitions = "gnD" -- mapping to list all definitions in current file
- }
- }
- },
- playground = { enable = true },
- ensure_installed = {'rust', 'c', 'lua', 'query', 'fennel'} -- one of 'all', 'language', or a list of languages
-}
diff --git a/lua/ts_config.lua b/lua/ts_config.lua
@@ -0,0 +1,26 @@
+local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
+parser_config.vim = {
+ install_info = {
+ url = "~/projects/ts/tree-sitter-viml", -- local path or git repo
+ files = {"src/parser.c", "src/scanner.c"}
+ },
+}
+
+require'nvim-treesitter.configs'.setup {
+ highlight = {
+ enable = true, -- false will disable the whole extension
+ disable = {}, -- list of language that will be disabled
+ },
+ incremental_selection = {
+ enable = true,
+ disable = {},
+ keymaps = { -- mappings for incremental selection (visual mappings)
+ init_selection = 'gnn', -- maps in normal mode to init the node/scope selection
+ node_incremental = "grn", -- increment to the upper named parent
+ scope_incremental = "grc", -- increment to the upper scope (as defined in locals.scm)
+ node_decremental = "grm", -- decrement to the previous node
+ }
+ },
+ playground = { enable = true },
+ ensure_installed = {'rust', 'c', 'lua', 'query', 'fennel', 'python'} -- one of 'all', 'language', or a list of languages
+}
diff --git a/parser/java.so b/parser/java.so
Binary files differ.
diff --git a/parser/markdown.so b/parser/markdown.so
Binary files differ.
diff --git a/parser/mem.so b/parser/mem.so
Binary files differ.
diff --git a/plugin/packer_compiled.vim b/plugin/packer_compiled.vim
@@ -1,374 +0,0 @@
-" Automatically generated packer.nvim plugin loader code
-
-if !has('nvim-0.5')
- echohl WarningMsg
- echom "Invalid Neovim version for packer.nvim!"
- echohl None
- finish
-endif
-try
-
-lua << END
- local package_path_str = "/home/thomas/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/thomas/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/thomas/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/thomas/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
- local install_cpath_pattern = "/home/thomas/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so"
- if not string.find(package.path, package_path_str, 1, true) then
- package.path = package.path .. ';' .. package_path_str
- end
-
- if not string.find(package.cpath, install_cpath_pattern, 1, true) then
- package.cpath = package.cpath .. ';' .. install_cpath_pattern
- end
-
-_G.packer_plugins = {
- ["LanguageTool.nvim"] = {
- loaded = false,
- only_sequence = false,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/opt/LanguageTool.nvim"
- },
- aniseed = {
- loaded = true,
- only_sequence = true,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/start/aniseed"
- },
- ["architext.nvim"] = {
- loaded = true,
- only_sequence = true,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/start/architext.nvim"
- },
- ["completion-nvim"] = {
- loaded = true,
- only_sequence = true,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/start/completion-nvim"
- },
- ["completion-treesitter"] = {
- loaded = true,
- only_sequence = true,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/start/completion-treesitter"
- },
- editors = {
- loaded = true,
- only_sequence = true,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/start/editors"
- },
- ["fennel.vim"] = {
- loaded = true,
- only_sequence = true,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/start/fennel.vim"
- },
- ["mem.nvim"] = {
- loaded = true,
- only_sequence = true,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/start/mem.nvim"
- },
- ["nvim-colorizer.lua"] = {
- loaded = true,
- only_sequence = true,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/start/nvim-colorizer.lua"
- },
- ["nvim-lspconfig"] = {
- loaded = true,
- only_sequence = true,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/start/nvim-lspconfig"
- },
- ["nvim-tree-docs"] = {
- loaded = true,
- only_sequence = true,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/start/nvim-tree-docs"
- },
- ["nvim-treesitter"] = {
- loaded = true,
- only_sequence = true,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/start/nvim-treesitter"
- },
- oak = {
- loaded = true,
- only_sequence = true,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/start/oak"
- },
- ["packer.nvim"] = {
- loaded = false,
- only_sequence = false,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/opt/packer.nvim"
- },
- playground = {
- loaded = true,
- only_sequence = true,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/start/playground"
- },
- ["plenary.nvim"] = {
- loaded = true,
- only_sequence = true,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/start/plenary.nvim"
- },
- ["popup.nvim"] = {
- loaded = true,
- only_sequence = true,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/start/popup.nvim"
- },
- ["pres.vim"] = {
- loaded = true,
- only_sequence = true,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/start/pres.vim"
- },
- ["ratatoskr.nvim"] = {
- loaded = true,
- only_sequence = true,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/start/ratatoskr.nvim"
- },
- ["scope-tree"] = {
- loaded = true,
- only_sequence = true,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/start/scope-tree"
- },
- ["telescope-fzy-native.nvim"] = {
- loaded = true,
- only_sequence = true,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/start/telescope-fzy-native.nvim"
- },
- ["telescope.nvim"] = {
- config = { "\27LJ\2\n+\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\16tele-config\frequire\0" },
- loaded = true,
- only_sequence = true,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/start/telescope.nvim"
- },
- ["templar.nvim"] = {
- loaded = true,
- only_sequence = true,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/start/templar.nvim"
- },
- ["vim-commentary"] = {
- loaded = true,
- only_sequence = true,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/start/vim-commentary"
- },
- ["vim-dispatch"] = {
- commands = { "Make", "Dispatch" },
- keys = { { "", "m<CR>" }, { "", "`<CR>" } },
- loaded = false,
- only_sequence = false,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/opt/vim-dispatch"
- },
- ["vim-obsession"] = {
- loaded = true,
- only_sequence = true,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/start/vim-obsession"
- },
- ["vim-ps1"] = {
- loaded = true,
- only_sequence = true,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/start/vim-ps1"
- },
- ["vim-surround"] = {
- loaded = true,
- only_sequence = true,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/start/vim-surround"
- },
- ["vim-toml"] = {
- loaded = true,
- only_sequence = true,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/start/vim-toml"
- },
- ["vim-vsnip"] = {
- loaded = true,
- only_sequence = true,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/start/vim-vsnip"
- },
- ["vim-vsnip-integ"] = {
- loaded = true,
- only_sequence = true,
- only_setup = false,
- path = "/home/thomas/.local/share/nvim/site/pack/packer/start/vim-vsnip-integ"
- }
-}
-
-local function handle_bufread(names)
- for _, name in ipairs(names) do
- local path = packer_plugins[name].path
- for _, dir in ipairs({ 'ftdetect', 'ftplugin', 'after/ftdetect', 'after/ftplugin' }) do
- if #vim.fn.finddir(dir, path) > 0 then
- vim.cmd('doautocmd BufRead')
- return
- end
- end
- end
-end
-
-local packer_load = nil
-local function handle_after(name, before)
- local plugin = packer_plugins[name]
- plugin.load_after[before] = nil
- if next(plugin.load_after) == nil then
- packer_load({name}, {})
- end
-end
-
-packer_load = function(names, cause)
- local some_unloaded = false
- for _, name in ipairs(names) do
- if not packer_plugins[name].loaded then
- some_unloaded = true
- break
- end
- end
-
- if not some_unloaded then return end
-
- local fmt = string.format
- local del_cmds = {}
- local del_maps = {}
- for _, name in ipairs(names) do
- if packer_plugins[name].commands then
- for _, cmd in ipairs(packer_plugins[name].commands) do
- del_cmds[cmd] = true
- end
- end
-
- if packer_plugins[name].keys then
- for _, key in ipairs(packer_plugins[name].keys) do
- del_maps[key] = true
- end
- end
- end
-
- for cmd, _ in pairs(del_cmds) do
- vim.cmd('silent! delcommand ' .. cmd)
- end
-
- for key, _ in pairs(del_maps) do
- vim.cmd(fmt('silent! %sunmap %s', key[1], key[2]))
- end
-
- for _, name in ipairs(names) do
- if not packer_plugins[name].loaded then
- vim.cmd('packadd ' .. name)
- if packer_plugins[name].config then
- for _i, config_line in ipairs(packer_plugins[name].config) do
- loadstring(config_line)()
- end
- end
-
- if packer_plugins[name].after then
- for _, after_name in ipairs(packer_plugins[name].after) do
- handle_after(after_name, name)
- vim.cmd('redraw')
- end
- end
-
- packer_plugins[name].loaded = true
- end
- end
-
- handle_bufread(names)
-
- if cause.cmd then
- local lines = cause.l1 == cause.l2 and '' or (cause.l1 .. ',' .. cause.l2)
- vim.cmd(fmt('%s%s%s %s', lines, cause.cmd, cause.bang, cause.args))
- elseif cause.keys then
- local keys = cause.keys
- local extra = ''
- while true do
- local c = vim.fn.getchar(0)
- if c == 0 then break end
- extra = extra .. vim.fn.nr2char(c)
- end
-
- if cause.prefix then
- local prefix = vim.v.count ~= 0 and vim.v.count or ''
- prefix = prefix .. '"' .. vim.v.register .. cause.prefix
- if vim.fn.mode('full') == 'no' then
- if vim.v.operator == 'c' then
- prefix = '' .. prefix
- end
-
- prefix = prefix .. vim.v.operator
- end
-
- vim.fn.feedkeys(prefix, 'n')
- end
-
- local escaped_keys = vim.api.nvim_replace_termcodes(cause.keys .. extra, true, true, true)
- vim.api.nvim_feedkeys(escaped_keys, 'm', true)
- elseif cause.event then
- vim.cmd(fmt('doautocmd <nomodeline> %s', cause.event))
- elseif cause.ft then
- vim.cmd(fmt('doautocmd <nomodeline> %s FileType %s', 'filetypeplugin', cause.ft))
- vim.cmd(fmt('doautocmd <nomodeline> %s FileType %s', 'filetypeindent', cause.ft))
- end
-end
-
-_packer_load_wrapper = function(names, cause)
- success, err_msg = pcall(packer_load, names, cause)
- if not success then
- vim.cmd('echohl ErrorMsg')
- vim.cmd('echomsg "Error in packer_compiled: ' .. vim.fn.escape(err_msg, '"') .. '"')
- vim.cmd('echomsg "Please check your config for correctness"')
- vim.cmd('echohl None')
- end
-end
-
--- Runtimepath customization
-
--- Pre-load configuration
--- Post-load configuration
--- Config for: telescope.nvim
-loadstring("\27LJ\2\n+\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\16tele-config\frequire\0")()
--- Conditional loads
--- Load plugins in order defined by `after`
-END
-
-function! s:load(names, cause) abort
- call luaeval('_packer_load_wrapper(_A[1], _A[2])', [a:names, a:cause])
-endfunction
-
-
-" Command lazy-loads
-command! -nargs=* -range -bang -complete=file Make call s:load(['vim-dispatch'], { "cmd": "Make", "l1": <line1>, "l2": <line2>, "bang": <q-bang>, "args": <q-args> })
-command! -nargs=* -range -bang -complete=file Dispatch call s:load(['vim-dispatch'], { "cmd": "Dispatch", "l1": <line1>, "l2": <line2>, "bang": <q-bang>, "args": <q-args> })
-
-" Keymap lazy-loads
-noremap <silent> m<CR> <cmd>call <SID>load(['vim-dispatch'], { "keys": "m\<CR\>", "prefix": "" })<cr>
-noremap <silent> `<CR> <cmd>call <SID>load(['vim-dispatch'], { "keys": "`\<CR\>", "prefix": "" })<cr>
-
-augroup packer_load_aucmds
- au!
- " Filetype lazy-loads
- " Event lazy-loads
- " Function lazy-loads
-augroup END
-
-catch
- echohl ErrorMsg
- echom "Error in packer_compiled: " .. v:exception
- echom "Please check your config for correctness"
- echohl None
-endtry