Created
September 16, 2026 12:13
-
-
Save claer/1b094fe5cf84f29ec1ae6490769f4815 to your computer and use it in GitHub Desktop.
nvim config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- charge le gestionnaire de plugins Lazy | |
| require("config.lazy") | |
| -- remove default Y mapping | |
| vim.keymap.del('n', 'Y') | |
| vim.opt.mouse = "nv" | |
| vim.opt.clipboard = "unnamedplus" | |
| vim.opt.termguicolors = true | |
| vim.o.hlsearch = false | |
| vim.opt.rtp:append(os.getenv("HOME") .. "/.fzf") | |
| -- treat Jinja2 templates (.j2) as htmldjango for syntax highlighting | |
| vim.filetype.add({ | |
| extension = { | |
| j2 = "htmldjango", | |
| }, | |
| }) | |
| vim.cmd([[colorscheme PaperColor]]) | |
| -- vim.cmd[[set runtimepath+=/Users/benpap/Downloads/repos/AmazonQNVim]] | |
| require("codecompanion").setup({ | |
| interactions = { | |
| chat = { | |
| adapter = "kiro", | |
| }, | |
| cli = { | |
| agent = "kiro", | |
| agents = { | |
| kiro = { | |
| cmd = "kiro-cli", | |
| args = { "chat" }, | |
| description = "Kiro CLI", | |
| provider = "terminal", | |
| }, | |
| }, | |
| }, | |
| }, | |
| }) | |
| require("neo-tree").setup({ | |
| source_selector = { | |
| winbar = true, | |
| statusline = false | |
| } | |
| }) | |
| vim.api.nvim_create_autocmd("VimEnter", { | |
| callback = function() | |
| -- only open Neo-tree when nvim was started with no file arguments | |
| if vim.fn.argc() == 0 then | |
| vim.cmd("Neotree show") | |
| end | |
| end, | |
| }) | |
| #################################### | |
| return { | |
| -- the colorscheme should be available when starting Neovim | |
| { | |
| "NLKNguyen/papercolor-theme", | |
| 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() | |
| -- load the colorscheme here | |
| vim.cmd([[colorscheme PaperColor]]) | |
| end, | |
| }, | |
| -- Terraform syntax highlight | |
| { | |
| "hashivim/vim-terraform", | |
| ft = "terraform", | |
| cmd = {"Terraform", "TerraformFmt"} | |
| }, | |
| -- Tree Sitter (main / rewrite branch) | |
| { | |
| "nvim-treesitter/nvim-treesitter", | |
| branch = "main", | |
| lazy = false, -- main branch does NOT support lazy-loading | |
| build = ":TSUpdate", | |
| config = function() | |
| require("nvim-treesitter").setup() | |
| -- declare the parsers you want and install them (async, no-op if present) | |
| require("nvim-treesitter").install({ | |
| "lua", "vim", "vimdoc", "python", | |
| "terraform", "hcl", "javascript", "html", | |
| "markdown", "markdown_inline", "bash", "json", "yaml", | |
| "htmldjango", | |
| }) | |
| -- enable treesitter highlighting per-filetype (Neovim provides this now) | |
| vim.api.nvim_create_autocmd("FileType", { | |
| pattern = { | |
| "lua", "vim", "python", | |
| "terraform", "hcl", "javascript", "html", | |
| "markdown", "bash", "json", "yaml", | |
| "htmldjango", | |
| }, | |
| callback = function() | |
| pcall(vim.treesitter.start) | |
| end, | |
| }) | |
| end, | |
| }, | |
| { | |
| "olimorris/codecompanion.nvim", | |
| version = "^19.0.0", | |
| opts = {}, | |
| dependencies = { | |
| "nvim-lua/plenary.nvim", | |
| "nvim-treesitter/nvim-treesitter", | |
| }, | |
| }, | |
| { | |
| "MeanderingProgrammer/render-markdown.nvim", | |
| ft = { "markdown", "codecompanion" } | |
| }, | |
| -- Tree Sitter | |
| { | |
| "sindrets/diffview.nvim", | |
| }, | |
| { | |
| "nvim-neo-tree/neo-tree.nvim", | |
| branch = "v3.x", | |
| dependencies = { | |
| "nvim-lua/plenary.nvim", | |
| "MunifTanjim/nui.nvim", | |
| "nvim-tree/nvim-web-devicons", -- optional, but recommended | |
| }, | |
| lazy = false, -- neo-tree will lazily load itself | |
| }, | |
| { | |
| "akinsho/bufferline.nvim", | |
| version = "*", | |
| dependencies = "nvim-tree/nvim-web-devicons", | |
| lazy = false, | |
| config = function() | |
| require("bufferline").setup({ | |
| options = { | |
| mode = "buffers", -- show buffers (open files), not tabpages | |
| diagnostics = "nvim_lsp", | |
| offsets = { | |
| { | |
| filetype = "neo-tree", | |
| text = "File Explorer", | |
| text_align = "left", | |
| separator = true, | |
| }, | |
| }, | |
| }, | |
| }) | |
| -- cycle through open files | |
| -- vim.keymap.set("n", "<Tab>", "<Cmd>BufferLineCycleNext<CR>", { desc = "Next buffer" }) | |
| -- vim.keymap.set("n", "<S-Tab>", "<Cmd>BufferLineCyclePrev<CR>", { desc = "Prev buffer" }) | |
| -- vim.keymap.set("n", "<leader>bd", "<Cmd>bdelete<CR>", { desc = "Close buffer" }) | |
| end, | |
| }, | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment