From 6d492f07ba625b3e0ca71a94383d0b0a69eb0ba7 Mon Sep 17 00:00:00 2001 From: afoucaultc Date: Tue, 7 Jul 2026 10:37:27 +0200 Subject: [PATCH] big changes on neovim --- dotfiles/hypr/conf/binding.lua | 1 + dotfiles/hypr/conf/style.lua | 8 +- dotfiles/hypr/conf/variables.lua | 1 + dotfiles/hypr/conf/windowrules.lua | 7 ++ dotfiles/nvim/lazy-lock.json | 40 +++++--- dotfiles/nvim/lua/neoconf/autocmd.lua | 14 +++ dotfiles/nvim/lua/neoconf/lazy/conform.lua | 44 --------- dotfiles/nvim/lua/neoconf/lazy/csvview.lua | 24 ----- dotfiles/nvim/lua/neoconf/lazy/lsp.lua | 30 ++++++ .../{markdown-preview.lua => markview.lua} | 7 +- dotfiles/nvim/lua/neoconf/lazy/mason.lua | 35 +------ dotfiles/nvim/lua/neoconf/lazy/plenary.lua | 5 - dotfiles/nvim/lua/neoconf/lazy/statusbar.lua | 22 ----- dotfiles/nvim/lua/neoconf/lazy/theme.lua | 19 ++-- dotfiles/nvim/lua/neoconf/lazy/treesitter.lua | 62 +++++-------- dotfiles/nvim/lua/neoconf/lazy/tungsten.lua | 14 --- dotfiles/nvim/lua/neoconf/lazy/vimtex.lua | 1 + dotfiles/nvim/lua/neoconf/lazy_init.lua | 14 ++- dotfiles/nvim/lua/neoconf/lsp-config.lua | 12 --- .../nvim/lua/neoconf/plugins_settings.lua | 7 -- dotfiles/nvim/lua/neoconf/remap.lua | 10 ++ home/afoucaultc/packages/btop.nix | 6 +- home/afoucaultc/packages/firefox.nix | 10 +- home/afoucaultc/packages/git.nix | 14 +-- home/afoucaultc/packages/neovim.nix | 35 ++++++- home/afoucaultc/packages/other_apps_light.nix | 91 ++++++++++--------- 26 files changed, 242 insertions(+), 291 deletions(-) delete mode 100644 dotfiles/nvim/lua/neoconf/lazy/conform.lua delete mode 100644 dotfiles/nvim/lua/neoconf/lazy/csvview.lua create mode 100644 dotfiles/nvim/lua/neoconf/lazy/lsp.lua rename dotfiles/nvim/lua/neoconf/lazy/{markdown-preview.lua => markview.lua} (78%) delete mode 100644 dotfiles/nvim/lua/neoconf/lazy/plenary.lua delete mode 100644 dotfiles/nvim/lua/neoconf/lazy/statusbar.lua delete mode 100644 dotfiles/nvim/lua/neoconf/lazy/tungsten.lua diff --git a/dotfiles/hypr/conf/binding.lua b/dotfiles/hypr/conf/binding.lua index 8988690..185618a 100644 --- a/dotfiles/hypr/conf/binding.lua +++ b/dotfiles/hypr/conf/binding.lua @@ -7,6 +7,7 @@ hl.bind( hl.bind("CTRL + ALT + L", hl.dsp.exec_cmd(lockscreen)) -- launchers hl.bind("ALT + D", hl.dsp.exec_cmd(fileManager)) +hl.bind("ALT + D", hl.dsp.exec_cmd(fileManager2)) hl.bind("ALT + Q", hl.dsp.exec_cmd(terminal)) hl.bind("ALT + N", hl.dsp.exec_cmd("kitty -e nvim")) hl.bind("ALT + W", hl.dsp.exec_cmd(app_launcher)) diff --git a/dotfiles/hypr/conf/style.lua b/dotfiles/hypr/conf/style.lua index 3279386..1220ce1 100644 --- a/dotfiles/hypr/conf/style.lua +++ b/dotfiles/hypr/conf/style.lua @@ -10,7 +10,7 @@ hl.config({ resize_on_border = true, hover_icon_on_border = true, allow_tearing = true, - layout = "dwindle", + layout = "master", snap = { enabled = true, }, @@ -47,9 +47,9 @@ hl.config({ preserve_split = true, }, master = { - new_status = "master", - orientation = "center", - mfact = "0.5", + new_status = "slave", + orientation = "left", + mfact = "0.7", }, scrolling = { fullscreen_on_one_column = true, diff --git a/dotfiles/hypr/conf/variables.lua b/dotfiles/hypr/conf/variables.lua index 47dc16b..e81fb47 100644 --- a/dotfiles/hypr/conf/variables.lua +++ b/dotfiles/hypr/conf/variables.lua @@ -1,5 +1,6 @@ terminal = "kitty" fileManager = "dolphin" +fileManager2 = "nautilus" menu = "wofi --show drun" home = "/home/afoucaultc/" lockscreen = "hyprlock" diff --git a/dotfiles/hypr/conf/windowrules.lua b/dotfiles/hypr/conf/windowrules.lua index 9e6ffa1..d13ddf8 100644 --- a/dotfiles/hypr/conf/windowrules.lua +++ b/dotfiles/hypr/conf/windowrules.lua @@ -5,3 +5,10 @@ hl.window_rule({ }, opacity = "0.9", }) +hl.window_rule({ + name = "opacity zathura", + match = { + class = "org.pwmt.zathura", + }, + opacity = 2, +}) diff --git a/dotfiles/nvim/lazy-lock.json b/dotfiles/nvim/lazy-lock.json index 3718689..84b863e 100644 --- a/dotfiles/nvim/lazy-lock.json +++ b/dotfiles/nvim/lazy-lock.json @@ -1,37 +1,53 @@ { + "LazyVim": { "branch": "main", "commit": "c10948c50b18fae7f256433afdef09e432410480" }, "LuaSnip": { "branch": "master", "commit": "0abc8f390b278c3b4aabc4c004ac8a088b65cf24" }, - "NeoSolarized.nvim": { "branch": "master", "commit": "3c55ad358c062aa4879950c4f83b4deeac6b72df" }, - "Tungsten": { "branch": "main", "commit": "329053bffc28762f2ca29b76405a9687b1747ff7" }, "alpha-nvim": { "branch": "main", "commit": "6c6a89d5b068b5251c8bdf0dd57bb921bcfeeb09" }, "baleia.nvim": { "branch": "main", "commit": "710537ff5cd669c5a76c5f5b6a9169fd9b913d18" }, "blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" }, + "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, + "catppuccin": { "branch": "main", "commit": "e068ab5f8261f23f6f71ffd8791ae40315b77b9c" }, "conform.nvim": { "branch": "master", "commit": "619363c30309d29ffa631e67c8183f2a72caa373" }, "csvview.nvim": { "branch": "main", "commit": "5c22774c3ecc7f8883af5d143b366e45b1f0875d" }, "debugpy.nvim": { "branch": "master", "commit": "490a0d7bfa23af8c6096bb3fbd867770b7d4a28b" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, + "flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" }, "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, + "fzf-lua": { "branch": "main", "commit": "774150bc05f774af1df614f55d156b3318c6decd" }, + "gitsigns.nvim": { "branch": "main", "commit": "eb60cc7b94c46005237fd34170d76f3a089a90aa" }, + "grug-far.nvim": { "branch": "main", "commit": "c69859c1d5427ab5fc7ed12380ab521b4e336691" }, "image.nvim": { "branch": "master", "commit": "88351f1f7d9dbae286e671ce3690a49660dd8a5c" }, - "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, + "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, + "lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" }, "lualine.nvim": { "branch": "master", "commit": "221ce6b2d999187044529f49da6554a92f740a96" }, - "markview.nvim": { "branch": "main", "commit": "301e431c7b618235f5447d54465c70934bd33668" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "21c5b3ebeaa0412e28096bb0701434c51c1fbf76" }, - "mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" }, + "markview.nvim": { "branch": "main", "commit": "092c0872fd2437b3b862d253910981142d2465aa" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "47059d71b42d74b0a1e9f61c1d99d301039c3b5b" }, "mason.nvim": { "branch": "main", "commit": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d" }, - "mini.icons": { "branch": "main", "commit": "e56797f90192d81f1fda02e662fc3e8e3d775027" }, + "mini.ai": { "branch": "main", "commit": "cb20f298ebf5ae91924cd0c6c310712de2ef4086" }, + "mini.icons": { "branch": "main", "commit": "24dbea2195c477e57d581215839a6ab915f34b14" }, + "mini.pairs": { "branch": "main", "commit": "fd150ac39b78e6a2286f5138e472b7dc7eba43b9" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "ebd66767191714e008ce73b769518a763ff31bdc" }, - "neogit": { "branch": "master", "commit": "43ea1a0854052e583f647e0b35879f0158a70a78" }, + "neogit": { "branch": "master", "commit": "6fc2fa890bd2031ed999c074daab0fb4feff20a5" }, "noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim-dap": { "branch": "master", "commit": "9e848e09a697ee95302a3ef2dd43fd6eb709e570" }, - "nvim-lspconfig": { "branch": "master", "commit": "bfcc0171a43f22afa61d927ffe9fcb6cb85dc99e" }, + "nvim-lint": { "branch": "master", "commit": "a219b2c9e5b4765e5c845aba119dad55806fcaf1" }, + "nvim-lspconfig": { "branch": "master", "commit": "d224a1920728ba129880efc700d4a0180ac4ecbb" }, "nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" }, - "nvim-web-devicons": { "branch": "master", "commit": "dfbfaa967a6f7ec50789bead7ef87e336c1fa63c" }, + "nvim-treesitter-textobjects": { "branch": "main", "commit": "851e865342e5a4cb1ae23d31caf6e991e1c99f1e" }, + "nvim-ts-autotag": { "branch": "main", "commit": "88c1453db4ba7dd24131086fe51fdf74e587d275" }, + "nvim-web-devicons": { "branch": "master", "commit": "dad71387de386a946b123079d0e53f23028f3abd" }, "oil.nvim": { "branch": "master", "commit": "b73018b75affd13fa38e2fc94ef753b465f770d7" }, + "persistence.nvim": { "branch": "main", "commit": "b20b2a7887bd39c1a356980b45e03250f3dce49c" }, "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, + "snacks.nvim": { "branch": "main", "commit": "882c996cf28183f4d63640de0b4c02ec886d01f2" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "b25b749b9db64d375d782094e2b9dce53ad53a40" }, "telescope.nvim": { "branch": "master", "commit": "427b576c16792edad01a92b89721d923c19ad60f" }, + "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }, "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, - "ultisnips": { "branch": "master", "commit": "403da03d9169b53738be8ebc93cd73caff195bda" }, - "vimtex": { "branch": "master", "commit": "63745fa542346e0f09a496d440645ef6ff75b62c" }, + "tokyonight.nvim": { "branch": "main", "commit": "cdc07ac78467a233fd62c493de29a17e0cf2b2b6" }, + "trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" }, + "ts-comments.nvim": { "branch": "main", "commit": "a59d6092213447450191122c9346f309161504cb" }, + "ultisnips": { "branch": "master", "commit": "62aca2a735b76d24a8fc7862f902330ac688849b" }, + "vimtex": { "branch": "master", "commit": "a5949d2800c1866c878956d49c51fc8d003c6b99" }, "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } } diff --git a/dotfiles/nvim/lua/neoconf/autocmd.lua b/dotfiles/nvim/lua/neoconf/autocmd.lua index 173f157..559397a 100644 --- a/dotfiles/nvim/lua/neoconf/autocmd.lua +++ b/dotfiles/nvim/lua/neoconf/autocmd.lua @@ -40,3 +40,17 @@ vim.api.nvim_create_autocmd("FileType", { vim.b.vimtex_syntax_enabled = 0 end, }) + +vim.api.nvim_create_autocmd("FileType", { + pattern = "*", + callback = function() + pcall(vim.treesitter.start) + end, +}) + +vim.api.nvim_create_autocmd("User", { + pattern = "VeryLazy", + callback = function() + pcall(vim.keymap.del, "n", "l") + end, +}) diff --git a/dotfiles/nvim/lua/neoconf/lazy/conform.lua b/dotfiles/nvim/lua/neoconf/lazy/conform.lua deleted file mode 100644 index 28454ad..0000000 --- a/dotfiles/nvim/lua/neoconf/lazy/conform.lua +++ /dev/null @@ -1,44 +0,0 @@ -return { -- Autoformat - "stevearc/conform.nvim", - event = { "BufWritePre" }, - cmd = { "ConformInfo" }, - keys = { - { - "f", - function() - require("conform").format({ async = true, lsp_format = "fallback" }) - end, - mode = "", - desc = "[F]ormat buffer", - }, - }, - opts = { - notify_on_error = false, - format_on_save = function(bufnr) - -- Disable "format_on_save lsp_fallback" for languages that don't - -- have a well standardized coding style. You can add additional - -- languages here or re-enable it for the disabled ones. - local disable_filetypes = { c = true, cpp = true } - if disable_filetypes[vim.bo[bufnr].filetype] then - return nil - else - return { - timeout_ms = 500, - lsp_format = "fallback", - } - end - end, - formatters_by_ft = { - lua = { "stylua" }, - -- Conform can also run multiple formatters sequentially - python = { "isort", "black" }, - -- - -- You can use 'stop_after_first' to run the first available formatter from the list - -- javascript = { "prettierd", "prettier", stop_after_first = true }, - }, - format_on_save = { - timeout_ms = 2000, - lsp_fallback = true, - }, - }, -} diff --git a/dotfiles/nvim/lua/neoconf/lazy/csvview.lua b/dotfiles/nvim/lua/neoconf/lazy/csvview.lua deleted file mode 100644 index 359a225..0000000 --- a/dotfiles/nvim/lua/neoconf/lazy/csvview.lua +++ /dev/null @@ -1,24 +0,0 @@ -return { - { - "hat0uma/csvview.nvim", - ---@module "csvview" - ---@type CsvView.Options - opts = { - parser = { comments = { "#", "//" } }, - keymaps = { - -- Text objects for selecting fields - textobject_field_inner = { "if", mode = { "o", "x" } }, - textobject_field_outer = { "af", mode = { "o", "x" } }, - -- Excel-like navigation: - -- Use and to move horizontally between fields. - -- Use and to move vertically between rows and place the cursor at the end of the field. - -- Note: In terminals, you may need to enable CSI-u mode to use and . - jump_next_field_end = { "", mode = { "n", "v" } }, - jump_prev_field_end = { "", mode = { "n", "v" } }, - jump_next_row = { "", mode = { "n", "v" } }, - jump_prev_row = { "", mode = { "n", "v" } }, - }, - }, - cmd = { "CsvViewEnable", "CsvViewDisable", "CsvViewToggle" }, - }, -} diff --git a/dotfiles/nvim/lua/neoconf/lazy/lsp.lua b/dotfiles/nvim/lua/neoconf/lazy/lsp.lua new file mode 100644 index 0000000..daf62c5 --- /dev/null +++ b/dotfiles/nvim/lua/neoconf/lazy/lsp.lua @@ -0,0 +1,30 @@ +return { + "neovim/nvim-lspconfig", + config = function() + -- lua_ls avec tes settings perso + vim.lsp.config("lua_ls", { + settings = { + Lua = { + diagnostics = { globals = { "vim" } }, + workspace = { library = vim.api.nvim_get_runtime_file("", true) }, + }, + }, + }) + + -- active tous les serveurs ; leurs configs viennent des + -- fichiers lsp/*.lua fournis par nvim-lspconfig (chargé ici) + vim.lsp.enable({ + "lua_ls", + "texlab", + "marksman", + "pyright", + "bashls", + "clangd", + "cssls", + "jsonls", + "html", + "ts_ls", + "vimls", + }) + end, +} diff --git a/dotfiles/nvim/lua/neoconf/lazy/markdown-preview.lua b/dotfiles/nvim/lua/neoconf/lazy/markview.lua similarity index 78% rename from dotfiles/nvim/lua/neoconf/lazy/markdown-preview.lua rename to dotfiles/nvim/lua/neoconf/lazy/markview.lua index fc1289b..7b34301 100644 --- a/dotfiles/nvim/lua/neoconf/lazy/markdown-preview.lua +++ b/dotfiles/nvim/lua/neoconf/lazy/markview.lua @@ -2,10 +2,11 @@ return { "OXY2DEV/markview.nvim", lazy = false, - preview = { - icon_provider = "internal", - }, opts = { + preview = { + icon_provider = "internal", + }, + modes = { "n", "i" }, latex = { enable = true, diff --git a/dotfiles/nvim/lua/neoconf/lazy/mason.lua b/dotfiles/nvim/lua/neoconf/lazy/mason.lua index 54e30cb..2c07b19 100644 --- a/dotfiles/nvim/lua/neoconf/lazy/mason.lua +++ b/dotfiles/nvim/lua/neoconf/lazy/mason.lua @@ -1,34 +1,5 @@ return { - { - "mason-org/mason-lspconfig.nvim", - opts = { - ensure_installed = { - "clangd", - "texlab", - "lua_ls", - "vimls", - "marksman", - "pyright", - "bashls", - "cssls", - "jsonls", - "jdtls", - "ts_ls", - "html", - }, - }, - dependencies = { - { "mason-org/mason.nvim", opts = {} }, - "neovim/nvim-lspconfig", - }, - }, - { - "WhoIsSethDaniel/mason-tool-installer.nvim", - opts = { - ensure_installed = { - "black", - "isort", - }, - }, - }, + { "mason-org/mason.nvim", enabled = false }, + { "mason-org/mason-lspconfig.nvim", enabled = false }, + { "WhoIsSethDaniel/mason-tool-installer.nvim", enabled = false }, } diff --git a/dotfiles/nvim/lua/neoconf/lazy/plenary.lua b/dotfiles/nvim/lua/neoconf/lazy/plenary.lua deleted file mode 100644 index 85d7b39..0000000 --- a/dotfiles/nvim/lua/neoconf/lazy/plenary.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - { - "nvim-lua/plenary.nvim", - }, -} diff --git a/dotfiles/nvim/lua/neoconf/lazy/statusbar.lua b/dotfiles/nvim/lua/neoconf/lazy/statusbar.lua deleted file mode 100644 index 34dee16..0000000 --- a/dotfiles/nvim/lua/neoconf/lazy/statusbar.lua +++ /dev/null @@ -1,22 +0,0 @@ -return { - "nvim-lualine/lualine.nvim", - opts = { - options = { - section_separators = { left = "", right = "" }, - component_separators = { left = "", right = "" }, - }, - sections = { - lualine_a = { { - "mode", - fmt = function(str) - return str:upper() - end, - } }, - lualine_b = { "branch", "diff" }, - lualine_c = { "filename" }, - lualine_x = { "diagnostics" }, - lualine_y = { "filetype" }, - lualine_z = { "progress", "location" }, - }, - }, -} diff --git a/dotfiles/nvim/lua/neoconf/lazy/theme.lua b/dotfiles/nvim/lua/neoconf/lazy/theme.lua index 7cac92e..fc9831a 100644 --- a/dotfiles/nvim/lua/neoconf/lazy/theme.lua +++ b/dotfiles/nvim/lua/neoconf/lazy/theme.lua @@ -1,10 +1,17 @@ return { + -- Configure le style de tokyonight { - "Tsuzat/NeoSolarized.nvim", - lazy = false, -- make sure we load this during startup if it is your main colorscheme - priority = 1000, -- make sure to load this before all the other start plugins - config = function() - vim.cmd([[ colorscheme NeoSolarized ]]) - end, + "folke/tokyonight.nvim", + opts = { + style = "night", -- "night" (dark), "storm", "moon", "day" + }, + }, + + -- Dit à LazyVim d'utiliser ce colorscheme + { + "LazyVim/LazyVim", + opts = { + colorscheme = "tokyonight-night", + }, }, } diff --git a/dotfiles/nvim/lua/neoconf/lazy/treesitter.lua b/dotfiles/nvim/lua/neoconf/lazy/treesitter.lua index 5cd566b..93ef313 100644 --- a/dotfiles/nvim/lua/neoconf/lazy/treesitter.lua +++ b/dotfiles/nvim/lua/neoconf/lazy/treesitter.lua @@ -1,39 +1,27 @@ return { - { -- Highlight, edit, and navigate code - "nvim-treesitter/nvim-treesitter", - build = ":TSUpdate", - opts = { - ensure_installed = { - "c++", - "matlab", - "regex", - "octave", - "yaml", - "python", - "latex", - "typst", - "zsh", - "markdown_inline", - "typst", - "comment", - "bash", - "c", - "html", - "lua", - "markdown", - "vim", - "vimdoc", - }, - auto_install = true, - highlight = { - enable = true, - additional_vim_regex_highlighting = false, - -- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules. - -- If you are experiencing weird indenting issues, add the language to - -- the list of additional_vim_regex_highlighting and disabled languages for indent. - additional_vim_regex_highlighting = { "ruby", "markdown" }, - }, - indent = { enable = true, disable = { "ruby, markdown" } }, - }, - }, + "nvim-treesitter/nvim-treesitter", + branch = "main", + build = ":TSUpdate", + config = function() + require("nvim-treesitter").setup({}) + require("nvim-treesitter").install({ + "cpp", + "matlab", + "regex", + "yaml", + "python", + "latex", + "typst", + "markdown_inline", + "comment", + "bash", + "c", + "html", + "lua", + "markdown", + "nix", + "vim", + "vimdoc", + }) + end, } diff --git a/dotfiles/nvim/lua/neoconf/lazy/tungsten.lua b/dotfiles/nvim/lua/neoconf/lazy/tungsten.lua deleted file mode 100644 index 9301f4e..0000000 --- a/dotfiles/nvim/lua/neoconf/lazy/tungsten.lua +++ /dev/null @@ -1,14 +0,0 @@ -return { - { - "B1gum/Tungsten", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-telescope/telescope.nvim", -- Optional - "folke/which-key.nvim", -- Optional - }, - build = "./scripts/install_python_deps.sh", -- This automates the packaging! - opts = { - backend = "python", - }, - }, -} diff --git a/dotfiles/nvim/lua/neoconf/lazy/vimtex.lua b/dotfiles/nvim/lua/neoconf/lazy/vimtex.lua index c236f9a..dad6ebb 100644 --- a/dotfiles/nvim/lua/neoconf/lazy/vimtex.lua +++ b/dotfiles/nvim/lua/neoconf/lazy/vimtex.lua @@ -10,6 +10,7 @@ return { vim.g.vimtex_format_enabled = 1 vim.g.vimtex_imaps_enabled = 0 vim.g.vimtex_complete_enabled = 0 + vim.g.vimtex_syntax_enabled = 0 vim.g.vimtex_compiler_latexmk = { aux_dir = vim.fn.expand("~/.aux-tex/"), } diff --git a/dotfiles/nvim/lua/neoconf/lazy_init.lua b/dotfiles/nvim/lua/neoconf/lazy_init.lua index 70ba28d..06ec4d0 100644 --- a/dotfiles/nvim/lua/neoconf/lazy_init.lua +++ b/dotfiles/nvim/lua/neoconf/lazy_init.lua @@ -1,6 +1,4 @@ -- (~/.config/nvim/lua/neoconf/lazy_init.lua) --- lazy is the package manager used for this nvim config --- local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not (vim.uv or vim.loop).fs_stat(lazypath) then vim.fn.system({ @@ -8,14 +6,20 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release + "--branch=stable", lazypath, }) end - vim.opt.rtp:prepend(lazypath) +-- leaders AVANT lazy.setup (exigé par LazyVim) +vim.g.mapleader = " " +vim.g.maplocalleader = "," + require("lazy").setup({ - spec = "neoconf.lazy", + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "neoconf.lazy" }, + }, change_detection = { notify = false }, }) diff --git a/dotfiles/nvim/lua/neoconf/lsp-config.lua b/dotfiles/nvim/lua/neoconf/lsp-config.lua index 0d0b677..9061272 100644 --- a/dotfiles/nvim/lua/neoconf/lsp-config.lua +++ b/dotfiles/nvim/lua/neoconf/lsp-config.lua @@ -1,15 +1,3 @@ -vim.lsp.config("lua_ls", { - settings = { - Lua = { - diagnostics = { globals = { "vim" } }, - workspace = { library = vim.api.nvim_get_runtime_file("", true) }, - }, - }, -}) - --- Enable servers (mason-lspconfig handles this automatically for installed ones) --- vim.lsp.enable("lua_ls") - -- diagnostic vim.diagnostic.config({ virtual_text = { diff --git a/dotfiles/nvim/lua/neoconf/plugins_settings.lua b/dotfiles/nvim/lua/neoconf/plugins_settings.lua index ee5dfb7..246beff 100644 --- a/dotfiles/nvim/lua/neoconf/plugins_settings.lua +++ b/dotfiles/nvim/lua/neoconf/plugins_settings.lua @@ -1,11 +1,4 @@ -- treesitter -vim.api.nvim_create_autocmd("FileType", { - pattern = { "" }, - callback = function() - vim.treesitter.start() - end, -}) - vim.wo[0][0].foldexpr = "v:lua.vim.treesitter.foldexpr()" vim.wo[0][0].foldmethod = "expr" diff --git a/dotfiles/nvim/lua/neoconf/remap.lua b/dotfiles/nvim/lua/neoconf/remap.lua index 2dd3919..e37463c 100644 --- a/dotfiles/nvim/lua/neoconf/remap.lua +++ b/dotfiles/nvim/lua/neoconf/remap.lua @@ -63,3 +63,13 @@ vim.api.nvim_create_user_command("OctaveRun", function() vim.cmd("write") vim.cmd('!octave -qf "%:p"') end, {}) + +-- set vimtex main to current file +local function vimtex_set_main() + vim.b.vimtex_main = vim.fn.expand("%:p") + vim.b.vimtex = nil + vim.fn["vimtex#init"]() + print("VimTeX main → " .. vim.b.vimtex_main) +end + +vim.keymap.set("n", "lm", vimtex_set_main, { desc = "VimTeX: set main to current file" }) diff --git a/home/afoucaultc/packages/btop.nix b/home/afoucaultc/packages/btop.nix index 7f264d3..49397b5 100644 --- a/home/afoucaultc/packages/btop.nix +++ b/home/afoucaultc/packages/btop.nix @@ -1,6 +1,6 @@ { pkgs, inputs, ... }: { - programs.btop = { - enable = true; - }; + programs.btop = { + enable = true; + }; } diff --git a/home/afoucaultc/packages/firefox.nix b/home/afoucaultc/packages/firefox.nix index c13664c..eb13e08 100644 --- a/home/afoucaultc/packages/firefox.nix +++ b/home/afoucaultc/packages/firefox.nix @@ -1,8 +1,8 @@ { pkgs, inputs, ... }: { - programs.firefox = { - enable = true; - profiles.default = { }; - }; - stylix.targets.firefox.profileNames = [ "default" ]; + programs.firefox = { + enable = true; + profiles.default = { }; + }; + stylix.targets.firefox.profileNames = [ "default" ]; } diff --git a/home/afoucaultc/packages/git.nix b/home/afoucaultc/packages/git.nix index d36637a..0fd54cd 100644 --- a/home/afoucaultc/packages/git.nix +++ b/home/afoucaultc/packages/git.nix @@ -1,10 +1,10 @@ { pkgs, inputs, ... }: { - programs.git = { - enable = true; - settings.user.name = "afoucaultc"; - settings.user.email = "antoine.fo.ca@proton.me"; - #userName = "afoucaultc"; - #userEmail = "antoine.fo.ca@proton.me"; - }; + programs.git = { + enable = true; + settings.user.name = "afoucaultc"; + settings.user.email = "antoine.fo.ca@proton.me"; + #userName = "afoucaultc"; + #userEmail = "antoine.fo.ca@proton.me"; + }; } diff --git a/home/afoucaultc/packages/neovim.nix b/home/afoucaultc/packages/neovim.nix index a6f8349..b3208e6 100644 --- a/home/afoucaultc/packages/neovim.nix +++ b/home/afoucaultc/packages/neovim.nix @@ -3,14 +3,39 @@ home.packages = with pkgs; [ neovim-unwrapped # outils dont lazy.nvim / les LSP ont besoin - ripgrep fd gcc gnumake nodejs unzip - lua-language-server stylua nil - (python3.withPackages (ps: with ps; [ pynvim ])) + ripgrep + fd + gcc + gnumake + nodejs + unzip + # formatters généraux + lua-language-server + stylua + nil + nixfmt-rfc-style # binaire "nixfmt" pour conform + # LSP serveurs (remplacent Mason) + marksman + pyright + # LSP que tu avais dans Mason — décommente selon besoin + clang-tools # clangd + bash-language-server # bashls + vscode-langservers-extracted # cssls, jsonls, html, eslint + typescript-language-server # ts_ls + vim-language-server # vimls + jdt-language-server # jdtls (Java) + # formatters / linters shell + python + shellcheck + shfmt + black + isort + # vimtex forward search + treesitter CLI + xdotool + tree-sitter + (python3.withPackages (ps: with ps; [ pynvim debugpy ])) ]; - home.sessionVariables.EDITOR = "nvim"; home.shellAliases = { vi = "nvim"; vim = "nvim"; }; - # ~/.config/nvim -> tes dotfiles, éditables en place xdg.configFile."nvim".source = config.lib.file.mkOutOfStoreSymlink diff --git a/home/afoucaultc/packages/other_apps_light.nix b/home/afoucaultc/packages/other_apps_light.nix index f8285ab..a1ebd74 100644 --- a/home/afoucaultc/packages/other_apps_light.nix +++ b/home/afoucaultc/packages/other_apps_light.nix @@ -1,54 +1,57 @@ { config, pkgs, ... }: { - home.packages = with pkgs; [ - # --- Infos système / divers --- - hyfetch # hyfetch - fastfetch # fastfetch - pkg-config + home.packages = with pkgs; [ + # --- Infos système / divers --- + hyfetch # hyfetch + fastfetch # fastfetch + pkg-config - # --- Bureautique --- - libreoffice-fresh # libreoffice-fresh - zotero # zotero (AUR) - pandoc # pandoc-cli + # --- Bureautique --- + libreoffice-fresh # libreoffice-fresh + zotero # zotero (AUR) + pandoc # pandoc-cli - # --- Communication / mail --- - # thunderbird # thunderbird - signal-desktop # signal-desktop - mattermost-desktop # mattermost-desktop - protonmail-bridge # protonmail-bridge (CLI/bridge) + # --- Communication / mail --- + # thunderbird # thunderbird + signal-desktop # signal-desktop + mattermost-desktop # mattermost-desktop + protonmail-bridge # protonmail-bridge (CLI/bridge) - # --- Multimédia (léger) --- - gimp # gimp - inkscape # inkscape - nomacs # nomacs (AUR) — visionneuse d'images légère - imagemagick # imagemagick - librsvg # librsvg + # --- Multimédia (léger) --- + gimp # gimp + inkscape # inkscape + nomacs # nomacs (AUR) — visionneuse d'images légère + imagemagick # imagemagick + librsvg # librsvg - # --- Maths / sciences --- - (octave.withPackages (ps: with ps; [ - image # octave-image - statistics # octave-statistics - symbolic # octave-symbolic - # dataframe # (octave-dataframe : indispo dans nixpkgs, à compiler via pkg si besoin) - ])) - gnuplot # gnuplot + # --- Maths / sciences --- + (octave.withPackages ( + ps: with ps; [ + image # octave-image + statistics # octave-statistics + symbolic # octave-symbolic + # dataframe # (octave-dataframe : indispo dans nixpkgs, à compiler via pkg si besoin) + ] + )) + gnuplot # gnuplot - # --- Fichiers / bureau --- - nautilus # nautilus (gestionnaire léger) - nwg-look # nwg-look - papirus-icon-theme # papirus-icon-theme - brightnessctl # brightnessctl - mako # mako (notifications légères, remplace noctalia) - cliphist # cliphist - grim slurp # captures (grimblast côté script si besoin) - mullvad-vpn # GUI Mullvad (le service est côté système) - ]; - programs.gpg.enable = true; + # --- Fichiers / bureau --- + nautilus # nautilus (gestionnaire léger) + nwg-look # nwg-look + papirus-icon-theme # papirus-icon-theme + brightnessctl # brightnessctl + mako # mako (notifications légères, remplace noctalia) + cliphist # cliphist + grim + slurp # captures (grimblast côté script si besoin) + mullvad-vpn # GUI Mullvad (le service est côté système) + ]; + programs.gpg.enable = true; - services.gpg-agent = { - enable = true; - pinentry.package = pkgs.pinentry-curses; - }; + services.gpg-agent = { + enable = true; + pinentry.package = pkgs.pinentry-curses; + }; - services.protonmail-bridge.enable = true; + services.protonmail-bridge.enable = true; }