homes/common/.config/lvim/config.lua

342 lines
11 KiB
Lua
Raw Normal View History

-- Read the docs: https://www.lunarvim.org/docs/configuration
-- Video Tutorials: https://www.youtube.com/watch?v=sFA9kX-Ud_c&list=PLhoH5vyxr6QqGu0i7tt_XoVK9v-KvZ3m6
-- Forum: https://www.reddit.com/r/lunarvim/
-- Discord: https://discord.com/invite/Xb9B4Ny
lvim.plugins = {
{
"EdenEast/nightfox.nvim",
lazy=false,
priority=1000
},
2023-10-24 03:54:53 +02:00
{
"folke/todo-comments.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
opts = {
signs = true, -- show icons in the signs column
sign_priority = 8, -- sign priority
-- keywords recognized as todo comments
keywords = {
FIX = {
icon = "",
color = "error",
alt = {"FIXME", "BUG", "FIXIT", "ISSUE"},
},
TODO = {
icon = "",
color = "info"
},
HACK = {
icon = "",
color = "hack"
},
WARN = {
icon = "",
color = "warning",
alt = {"WARNING", "XXX"}
},
PERF = {
icon = "󰓅 ",
color = "perf",
alt = {"OPTIM", "PERFORMANCE", "OPTIMIZE"}
},
NOTE = {
icon = "󱞂 ",
color = "hint",
alt = {"INFO", "HINT"}
},
TEST = {
icon = "",
color = "test",
alt = {"TESTING", "PASSED"}
},
FAILED = {
icon = "",
color = "fail"
},
},
merge_keywords = true,
highlight = {
multiline = true,
multiline_pattern = "^.",
multiline_context = 10,
before = "",
keyword = "wide",
after = "fg",
pattern = [[.*<(KEYWORDS)\s*:]],
comments_only = true,
max_line_len = 400,
exclude = {},
},
colors = {
error = {"DiagnosticError", "ErrorMsg", "#c94f6d"},
warning = {"DiagnosticWarn", "WarningMsg", "#dbc074"},
info = {"DiagnosticInfo", "#719cd6"},
perf = {"Keyword", "#9d79d6"},
hint = {"DiagnosticHint", "#81b29a"},
default = {"Identifier", "#63cdcf"},
test = {"Func", "#97c2fc"},
fail = {"Builtin3", "#ef7593"},
hack = {"Number", "#f4a261"}
},
search = {
command = "rg",
args = {
"--color=never",
"--no-heading",
"--with-filename",
"--line-number",
"--column",
},
pattern = [[\b(KEYWORDS):]],
},
}
},
{"uga-rosa/ccc.nvim"},
{
"axieax/urlview.nvim",
config = function()
require('urlview').setup({
default_picker = "telescope"
})
end,
},
{"nvim-telescope/telescope-ui-select.nvim"},
{
'saecki/crates.nvim',
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
require('crates').setup({
src = {
cmp = {
enabled = true,
},
},
})
end,
},
{"prochri/telescope-all-recent.nvim"},
{"barrett-ruth/telescope-http.nvim"},
{"nvim-telescope/telescope-frecency.nvim"},
{"HUAHUAI23/telescope-session.nvim"},
{"brookhong/telescope-pathogen.nvim"},
{"nvim-telescope/telescope-project.nvim"},
{"chip/telescope-code-fence.nvim"},
{"chip/telescope-software-licenses.nvim"},
{"nvim-telescope/telescope-media-files.nvim"},
{"nvim-telescope/telescope-fzf-writer.nvim"},
{"nvim-telescope/telescope-symbols.nvim"},
{"cljoly/telescope-repo.nvim"},
{"nvim-telescope/telescope-node-modules.nvim"},
{"bi0ha2ard/telescope-ros.nvim"},
{"luc-tielen/telescope_hoogle"},
{"TC72/telescope-tele-tabby.nvim"},
{"gbrlsnchs/telescope-lsp-handlers.nvim"},
{"dhruvmanila/browser-bookmarks.nvim"},
{"crispgm/telescope-heading.nvim"},
{"xiyaowong/telescope-emoji.nvim"},
{"ghassan0/telescope-glyph.nvim"},
{"kolja/telescope-opds"},
{"edolphin-ydf/goimpl.nvim"},
{"sshelll/telescope-gott.nvim"},
{"AckslD/nvim-neoclip.lua"},
{"danielpieper/telescope-tmuxinator.nvim"},
{"doctorfree/cheatsheet.nvim"},
{"nvim-telescope/telescope-hop.nvim"},
{"fcying/telescope-ctags-outline.nvim"},
{"LinArcX/telescope-command-palette.nvim"},
{"LinArcX/telescope-scriptnames.nvim"},
{"LinArcX/telescope-changes.nvim"},
{"olacin/telescope-cc.nvim"},
{"FeiyouG/command_center.nvim"},
{"nvim-telescope/telescope-file-browser.nvim"},
{"otavioschwanck/telescope-alternate.nvim"},
{"LukasPietzschmann/telescope-tabs"},
{"nat-418/telescope-color-names.nvim"},
{"octarect/telescope-menu.nvim"},
{"debugloop/telescope-undo.nvim"},
{"lpoto/telescope-docker.nvim"},
{"lpoto/telescope-tasks.nvim"},
{"piersolenski/telescope-import.nvim"},
{"cagve/telescope-texsuite"},
{"tyru/open-browser.vim"},
{"tamago324/telescope-openbrowser.nvim"},
{"MattesGroeger/vim-bookmarks"},
{"tom-anders/telescope-vim-bookmarks.nvim"},
{"camgraff/telescope-tmux.nvim"},
{"sindrets/diffview.nvim"},
{"paopaol/telescope-git-diffs.nvim"},
{"tsakirist/telescope-lazy.nvim"},
{"preservim/vim-pencil"},
{"pocco81/high-str.nvim"},
{
"nvim-neotest/neotest",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
"antoinemadec/FixCursorHold.nvim",
"nvim-neotest/neotest-python",
"nvim-neotest/neotest-plenary",
"akinsho/neotest-go",
"haydenmeade/neotest-jest",
"marilari88/neotest-vitest",
"thenbe/neotest-playwright",
"olimorris/neotest-rspec",
"zidhuss/neotest-minitest",
"sidlatau/neotest-dart",
"shunsambongi/neotest-testthat",
"olimorris/neotest-phpunit",
"theutz/neotest-pest",
"rouge8/neotest-rust",
"jfpedroza/neotest-elixir",
"llllvvuu/neotest-foundry",
"lawrence-laz/neotest-zig",
"nvim-neotest/neotest-vim-test",
"vim-test/vim-test"
},
config = function()
require("neotest").setup({
adapters = {
require("neotest-python")({
dap = { justMyCode = false },
}),
require("neotest-plenary"),
require("neotest-vim-test"),
require("neotest-go"),
require("neotest-jest"),
require("neotest-vitest"),
require("neotest-playwright"),
require("neotest-rspec"),
require("neotest-minitest"),
require("neotest-dart"),
require("neotest-testthat"),
require("neotest-phpunit"),
require("neotest-pest"),
require("neotest-rust"),
require("neotest-elixir"),
require("neotest-foundry"),
require("neotest-zig"),
},
})
end,
},
{"dhruvasagar/vim-table-mode"},
{"salkin-mada/openscad.nvim", event="BufRead"},
{"ChiliConSql/neovim-stylus", event="BufRead"},
{"digitaltoad/vim-pug", event="BufRead"},
{"pirmd/gemini.vim", event="BufRead"},
2023-10-18 02:50:18 +02:00
{"vmchale/ion-vim", event="BufRead"},
{"dpelle/vim-Grammalecte"},
{"vigoux/LanguageTool.nvim"},
2023-10-02 00:57:35 +02:00
{"chaimleib/vim-renpy", event="BufRead"},
{"meatballs/vim-xonsh", event="BufRead"}
}
vim.opt.clipboard = 'unnamedplus'
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = true
vim.opt.number = false
vim.opt.cursorline = true
vim.opt.splitbelow = true
vim.opt.splitright = true
vim.opt.termguicolors = true
vim.opt.showmode = false
vim.opt.textwidth=78
vim.opt.colorcolumn = "29,30,71,72,79,80,119,120,139,140"
vim.opt.incsearch = true
vim.opt.hlsearch = false
vim.opt.ignorecase = true
vim.opt.smartcase = true
2023-12-23 02:25:04 +01:00
vim.opt.wrap = true
vim.opt.fdm = 'indent'
2023-12-23 02:25:04 +01:00
vim.opt.listchars = {eol = '', tab = '⁝‧' , extends = '', precedes= '', trail = '˽', nbsp = '' }
vim.opt.showbreak = "……"
vim.opt.list = true
vim.opt.spelllang = 'fr'
vim.g.grammalecte_cli_py = '/usr/bin/grammalecte-cli'
vim.g.languagetool_jar = 'REPLACEHOME/.bin/languagetool-commandline.jar'
2023-10-24 03:54:53 +02:00
local opts = {noremap=true, silent=true}
local crates = require('crates')
vim.keymap.set('n', '<tab>', "gt", opts)
vim.keymap.set('n', '<S-tab>', "gT", opts)
vim.keymap.set('v', 'gle', ":'<,'>!lou_translate en-us-brf.dis,braille-patterns.cti<CR>", opts)
vim.keymap.set('v', 'gLe', ":'<,'>!lou_translate --backward en-us-brf.dis,braille-patterns.cti<CR>", opts)
vim.keymap.set('v', 'glf', ":'<,'>!lou_translate fr-bfu-comp6.utb,braille-patterns.cti<CR>", opts)
vim.keymap.set('v', 'gLf', ":'<,'>!lou_translate --backward fr-bfu-comp6.utb,braille-patterns.cti<CR>", opts)
2023-10-24 03:54:53 +02:00
vim.keymap.set("n", "\\u", "<Cmd>UrlView<CR>", { desc = "View buffer URLs" })
vim.keymap.set("n", "\\U", "<Cmd>UrlView lazy<CR>", { desc = "View Packer plugin URLs" })
vim.keymap.set("v", "\\1", ":<c-u>HSHighlight 1<CR>", { desc = "Highlight"})
vim.keymap.set("v", "\\2", ":<c-u>HSHighlight 2<CR>", { desc = "Highlight"})
vim.keymap.set("v", "\\3", ":<c-u>HSHighlight 3<CR>", { desc = "Highlight"})
vim.keymap.set("v", "\\4", ":<c-u>HSHighlight 4<CR>", { desc = "Highlight"})
vim.keymap.set("v", "\\5", ":<c-u>HSHighlight 5<CR>", { desc = "Highlight"})
vim.keymap.set("v", "\\6", ":<c-u>HSHighlight 6<CR>", { desc = "Highlight"})
vim.keymap.set("v", "\\7", ":<c-u>HSHighlight 7<CR>", { desc = "Highlight"})
vim.keymap.set("v", "\\8", ":<c-u>HSHighlight 8<CR>", { desc = "Highlight"})
vim.keymap.set("v", "\\9", ":<c-u>HSHighlight 9<CR>", { desc = "Highlight"})
vim.keymap.set("v", "\\0", ":<c-u>HSHighlight 0<CR>", { desc = "Highlight"})
vim.keymap.set("n", "\\r", ":<c-u>HSRmHighlight rm_all<CR>", { desc = "Remove highlight"})
vim.keymap.set("v", "\\r", ":<c-u>HSRmHighlight<CR>", { desc = "Remove highlight"})
vim.keymap.set('n', '<leader>ct', crates.toggle, opts)
vim.keymap.set('n', '<leader>cr', crates.reload, opts)
vim.keymap.set('n', '<leader>cv', crates.show_versions_popup, opts)
vim.keymap.set('n', '<leader>cf', crates.show_features_popup, opts)
vim.keymap.set('n', '<leader>cd', crates.show_dependencies_popup, opts)
vim.keymap.set('n', '<leader>cu', crates.update_crate, opts)
vim.keymap.set('v', '<leader>cu', crates.update_crates, opts)
vim.keymap.set('n', '<leader>ca', crates.update_all_crates, opts)
vim.keymap.set('n', '<leader>cU', crates.upgrade_crate, opts)
vim.keymap.set('v', '<leader>cU', crates.upgrade_crates, opts)
vim.keymap.set('n', '<leader>cA', crates.upgrade_all_crates, opts)
vim.keymap.set('n', '<leader>ce', crates.expand_plain_crate_to_inline_table, opts)
vim.keymap.set('n', '<leader>cE', crates.extract_crate_into_table, opts)
vim.keymap.set('n', '<leader>cH', crates.open_homepage, opts)
vim.keymap.set('n', '<leader>cR', crates.open_repository, opts)
vim.keymap.set('n', '<leader>cD', crates.open_documentation, opts)
vim.keymap.set('n', '<leader>cC', crates.open_crates_io, opts)
lvim.colorscheme="nightfox"
lvim.transparent_window = true
vim.diagnostic.config({
virtual_text = false
})
vim.o.updatetime = 2500
vim.cmd [[autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]]
2023-10-24 03:54:53 +02:00
local high_str = require("high-str")
high_str.setup({
verbosity = 0,
saving_path = "REPLACEHOME/.local/share/lvim/highstr/",
2023-10-24 03:54:53 +02:00
highlight_colors = {
-- color_id = {"bg_hex_code",<"fg_hex_code"/"smart">}
color_0 = {"#9d79d6", "smart"}, -- Cosmic charcoal
color_1 = {"#719cd6", "smart"}, -- Pastel yellow
color_2 = {"#81b29a", "smart"}, -- Aqua menthe
color_3 = {"#dbc074", "smart"}, -- Proton purple
color_4 = {"#f4a261", "smart"}, -- Orange red
color_5 = {"#c94f6d", "smart"}, -- Office green
color_6 = {"#d67ad2", "smart"}, -- Just blue
color_7 = {"#dfdfe0", "smart"}, -- Blush pink
color_8 = {"#63cdcf", "smart"}, -- Cosmic latte
color_9 = {"#71839b", "smart"}, -- Fallow brown
}
})