Update config

This commit is contained in:
Antoine Vaure 2023-08-16 16:49:27 +02:00
parent 88aff46b8e
commit fa43825712
3 changed files with 47 additions and 13 deletions

View file

@ -2,7 +2,7 @@ require("mason-lspconfig").setup_handlers {
-- The first entry (without a key) will be the default handler -- The first entry (without a key) will be the default handler
-- and will be called for each installed server that doesn't have -- and will be called for each installed server that doesn't have
-- a dedicated handler. -- a dedicated handler.
function (server_name) -- default handler (optional) function(server_name) -- default handler (optional)
require("lspconfig")[server_name].setup {} require("lspconfig")[server_name].setup {}
end, end,
-- Next, you can provide a dedicated handler for specific servers. -- Next, you can provide a dedicated handler for specific servers.
@ -10,7 +10,7 @@ require("mason-lspconfig").setup_handlers {
-- ["rust_analyzer"] = function () -- ["rust_analyzer"] = function ()
-- require("rust-tools").setup {} -- require("rust-tools").setup {}
-- end -- end
["lua_ls"] = function () ["lua_ls"] = function()
require("lspconfig").lua_ls.setup { require("lspconfig").lua_ls.setup {
settings = { settings = {
Lua = { Lua = {
@ -30,5 +30,24 @@ require("mason-lspconfig").setup_handlers {
}, },
}, },
} }
end,
["ltex"] = function()
require("lspconfig").ltex.setup {
settings = {
ltex = {
language = "fr-FR",
},
-- set formatter
formatters = {
["latexindent"] = {
exe = "latexindent",
args = { "-sl", "-g /dev/stderr" },
stdin = true,
},
},
},
}
end end
} }

View file

@ -12,6 +12,11 @@ vim.keymap.set('n', 'H', require('treesj').toggle)
vim.keymap.set( vim.keymap.set(
'n', 'n',
'<leader>ff', '<leader>ff',
"<cmd> Telescope find_files follow=true no_ignore=true <CR>"
)
vim.keymap.set(
'n',
'<leader>fF',
"<cmd> Telescope find_files follow=true no_ignore=true hidden=true <CR>" "<cmd> Telescope find_files follow=true no_ignore=true hidden=true <CR>"
) )
vim.keymap.set('n', '<leader>ft', MiniFiles.open, { desc = "Open file tree" }) vim.keymap.set('n', '<leader>ft', MiniFiles.open, { desc = "Open file tree" })
@ -25,7 +30,7 @@ vim.keymap.set({'n', 'v', 'o'}, '<a-h>', require('tree-climber').goto_parent)
vim.keymap.set({'n', 'v', 'o'}, '<a-l>', require('tree-climber').goto_child) vim.keymap.set({'n', 'v', 'o'}, '<a-l>', require('tree-climber').goto_child)
vim.keymap.set({'n', 'v', 'o'}, '<a-j>', require('tree-climber').goto_next) vim.keymap.set({'n', 'v', 'o'}, '<a-j>', require('tree-climber').goto_next)
vim.keymap.set({'n', 'v', 'o'}, '<a-k>', require('tree-climber').goto_prev) vim.keymap.set({'n', 'v', 'o'}, '<a-k>', require('tree-climber').goto_prev)
vim.keymap.set('n', '<leader>N', "<cmd> Neogit <cr>", { desc = "Open Neogit" })
-- Global mappings. -- Global mappings.
-- See `:help vim.diagnostic.*` for documentation on any of the below functions -- See `:help vim.diagnostic.*` for documentation on any of the below functions

View file

@ -68,6 +68,8 @@ local plugins = {
treesitter = true, treesitter = true,
mini = true, mini = true,
mason = true, mason = true,
neogit = true,
illuminate = false,
telescope = { telescope = {
enabled = true, enabled = true,
style = "nvchad" style = "nvchad"
@ -142,16 +144,15 @@ local plugins = {
}, },
{ {
"zbirenbaum/copilot.lua", "zbirenbaum/copilot.lua",
cmd = { "Copilot", "StartCopilot" }, cmd = { "Copilot" },
opts = { opts = {
suggestion = { suggestion = {
auto_trigger = true, auto_trigger = true,
}
}, },
config = function() filetypes = {
require("copilot").setup() markdown = true,
vim.cmd("command! StartCopilot Copilot suggestion") },
end, },
}, },
{ {
'nvim-lualine/lualine.nvim', 'nvim-lualine/lualine.nvim',
@ -292,7 +293,14 @@ local plugins = {
event = "VeryLazy", event = "VeryLazy",
dependencies = { "nvim-treesitter/nvim-treesitter" }, dependencies = { "nvim-treesitter/nvim-treesitter" },
config = function() config = function()
require("wildfire").setup() require("wildfire").setup({
keymaps = {
init_selection = "<space>",
node_incremental = "<space>",
node_decremental = "<c-space>",
}
}
)
end, end,
}, },
{ "lukas-reineke/indent-blankline.nvim" }, { "lukas-reineke/indent-blankline.nvim" },
@ -322,7 +330,9 @@ local plugins = {
"sindrets/diffview.nvim", -- optional "sindrets/diffview.nvim", -- optional
}, },
config = true config = true
} },
{ "RRethy/vim-illuminate" },
{ "ofseed/lualine-copilot" }
} }
return plugins return plugins