nvim-config

Log | Files | Refs | Submodules | README

commit e80cdbc121d87c28f897abcaf157d1e552307af0
parent accf489ec35c2b5a23ff27e7dc5b8a206a1cb45f
Author: Thomas Vigouroux <me@vigoux.eu>
Date:   Tue,  7 May 2024 09:44:20 +0200

style: move things around

Also avoid calling nvim-treesitter setup twice

Diffstat:
Mafter/plugin/mappings.lua | 3++-
Minit.lua | 5-----
Mlua/lsp_config.lua | 4++--
Mlua/ts_config.lua | 30------------------------------
4 files changed, 4 insertions(+), 38 deletions(-)

diff --git a/after/plugin/mappings.lua b/after/plugin/mappings.lua @@ -1,2 +1,3 @@ -vim.keymap.set('n', '<Leader>zn', require'zest'.open) vim.keymap.set('n', '<Leader>q', function() vim.diagnostic.setqflist{severity = vim.diagnostic.severity.ERROR} end) +vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { remap = false, silent = true }) +vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { remap = false, silent = true }) diff --git a/init.lua b/init.lua @@ -21,9 +21,6 @@ o.termguicolors = true o.splitright = true o.lazyredraw = true o.foldenable = false --- o.spelllang = { "en", "fr" } --- vim.o.spellfile = table.concat(vim.api.nvim_get_runtime_file("spell/*.add", true) or {}, ",") --- o.spelloptions = { 'noplainbuffer' } o.textwidth = 100 o.colorcolumn = "+0" o.signcolumn = "yes:1" @@ -111,8 +108,6 @@ require "mappings".set_mappings() require "neogit-config" -- Set up some useful diagnostics stuff -vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { remap = false, silent = true }) -vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { remap = false, silent = true }) vim.api.nvim_create_autocmd("InsertEnter", { callback = function() -- Force off lsp_lines on enter diff --git a/lua/lsp_config.lua b/lua/lsp_config.lua @@ -442,11 +442,11 @@ require 'ltex-ls'.setup { language = "auto", diagnosticSeverity = "information", additionalRules = { - -- enablePickyRules = true, + enablePickyRules = true, motherTongue = "fr", }, disabledRules = { - en = { "TOO_LONG_SENTENCE", "REGARD", "PASSIVE_VOICE" }, + en = { "REGARD", "PASSIVE_VOICE", "ACTUALLY", "REST" }, fr = { "APOS_TYP", "FRENCH_WHITESPACE", "FR_SPELLING_RULE", "COMMA_PARENTHESIS_WHITESPACE" } }, latex = { diff --git a/lua/ts_config.lua b/lua/ts_config.lua @@ -1,30 +0,0 @@ -local parser_config = require "nvim-treesitter.parsers".get_parser_configs() -if not parser_config.vim then - parser_config.vim = { - install_info = { - url = "/home/vigourth/src/perso/tree-sitter-viml/", - files = {"src/parser.c", "src/scanner.c"} - }, - filetype = "vim", - maintainers = { "@vigoux" }, -} -end - -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 = {'c', 'lua', 'query', 'fennel', 'python', 'vim', 'bash', 'latex'} -- one of 'all', 'language', or a list of languages -}