[nvim] add grammalect
This commit is contained in:
parent
d533425bcd
commit
46d8707e32
4 changed files with 38 additions and 3 deletions
|
@ -24,6 +24,9 @@ map('n', '<Leader>gc', ':Telescope git_commits<Enter>', options)
|
||||||
map('n', '<Leader><Space>', ':Telescope buffers<Enter>', options)
|
map('n', '<Leader><Space>', ':Telescope buffers<Enter>', options)
|
||||||
map('n', '<Leader>t', ':TagbarToggle<Enter>', options)
|
map('n', '<Leader>t', ':TagbarToggle<Enter>', options)
|
||||||
|
|
||||||
|
vim.g.grammalecte_cli_py = "~/Grammalecte-fr/grammalecte-cli.py"
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
-- LSP
|
-- LSP
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
|
@ -68,6 +71,24 @@ cmp.setup({
|
||||||
sources = {
|
sources = {
|
||||||
{name = 'nvim_lsp'},
|
{name = 'nvim_lsp'},
|
||||||
},
|
},
|
||||||
|
completion = {
|
||||||
|
autocomplete = false
|
||||||
|
},
|
||||||
|
mapping = cmp.mapping.preset.insert({
|
||||||
|
-- Navigate between completion items
|
||||||
|
['<C-p>'] = cmp.mapping.select_prev_item({behavior = 'select'}),
|
||||||
|
['<C-n>'] = cmp.mapping.select_next_item({behavior = 'select'}),
|
||||||
|
|
||||||
|
-- `Enter` key to confirm completion
|
||||||
|
['<CR>'] = cmp.mapping.confirm({select = false}),
|
||||||
|
|
||||||
|
-- Ctrl+Space to trigger completion menu
|
||||||
|
['<C-Space>'] = cmp.mapping.complete(),
|
||||||
|
|
||||||
|
-- Scroll up and down in the completion documentation
|
||||||
|
['<C-u>'] = cmp.mapping.scroll_docs(-4),
|
||||||
|
['<C-d>'] = cmp.mapping.scroll_docs(4),
|
||||||
|
}),
|
||||||
snippet = {
|
snippet = {
|
||||||
expand = function(args)
|
expand = function(args)
|
||||||
require('luasnip').lsp_expand(args.body)
|
require('luasnip').lsp_expand(args.body)
|
||||||
|
|
|
@ -9,6 +9,7 @@ vim.opt.relativenumber = true -- display relative line numbers
|
||||||
vim.opt.tabstop = 4 -- number of columns occupied by a tab character
|
vim.opt.tabstop = 4 -- number of columns occupied by a tab character
|
||||||
vim.opt.shiftwidth = 4 -- width for autoindents
|
vim.opt.shiftwidth = 4 -- width for autoindents
|
||||||
vim.opt.softtabstop = 4 -- see multiple spaces as tabstops so <BS> does the right thing
|
vim.opt.softtabstop = 4 -- see multiple spaces as tabstops so <BS> does the right thing
|
||||||
|
vim.opt.linebreak = true -- wrap lines between words
|
||||||
|
|
||||||
vim.opt.listchars:append {
|
vim.opt.listchars:append {
|
||||||
eol = "$",
|
eol = "$",
|
||||||
|
@ -20,3 +21,5 @@ vim.opt.listchars:append {
|
||||||
precedes = "<",
|
precedes = "<",
|
||||||
}
|
}
|
||||||
vim.opt.list = true
|
vim.opt.list = true
|
||||||
|
|
||||||
|
vim.opt.spelllang = {'fr', 'en'}
|
||||||
|
|
3
.config/nvim/lua/plugins/grammalect.lua
Normal file
3
.config/nvim/lua/plugins/grammalect.lua
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
return {
|
||||||
|
"dpelle/vim-Grammalecte",
|
||||||
|
}
|
|
@ -1,6 +1,14 @@
|
||||||
return {
|
return {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
build = function()
|
build = ":TSUpdate",
|
||||||
require("nvim-treesitter.install").update({ with_sync = true })()
|
config = function ()
|
||||||
end,
|
local configs = require("nvim-treesitter.configs")
|
||||||
|
|
||||||
|
configs.setup({
|
||||||
|
ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "elixir", "heex", "javascript", "html" },
|
||||||
|
sync_install = false,
|
||||||
|
highlight = { enable = true },
|
||||||
|
indent = { enable = true },
|
||||||
|
})
|
||||||
|
end
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue