From 6ca02f87fec05f450e06d5b1eebad8e05ad88144 Mon Sep 17 00:00:00 2001 From: Nurtrantpoem19 Date: Wed, 10 Jun 2026 11:45:39 -0400 Subject: [PATCH] thinkpad configs --- init.lua | 25 ++++++++++++++----------- lua/custom/plugins/gruvbox.lua | 30 ++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 11 deletions(-) create mode 100644 lua/custom/plugins/gruvbox.lua diff --git a/init.lua b/init.lua index 5d29c72d..b48343e1 100644 --- a/init.lua +++ b/init.lua @@ -99,7 +99,7 @@ do vim.g.maplocalleader = ' ' -- Set to true if you have a Nerd Font installed and selected in the terminal - vim.g.have_nerd_font = false + vim.g.have_nerd_font = true -- [[ Setting options ]] -- See `:help vim.o` @@ -778,6 +778,7 @@ do local enabled_filetypes = { -- lua = true, -- python = true, + cpp = true; } if enabled_filetypes[vim.bo[bufnr].filetype] then return { timeout_ms = 500 } @@ -796,6 +797,8 @@ do -- -- You can use 'stop_after_first' to run the first available formatter from the list -- javascript = { "prettierd", "prettier", stop_after_first = true }, + cpp = {"clang-format"}, + c = {"clang-format"}, }, } @@ -898,9 +901,9 @@ do vim.pack.add { { src = gh 'nvim-treesitter/nvim-treesitter', version = 'main' } } -- Ensure basic parsers are installed - local parsers = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' } + local parsers = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc', 'cpp', 'python' } require('nvim-treesitter').install(parsers) - + ---@param buf integer ---@param language string local function treesitter_try_attach(buf, language) @@ -919,7 +922,7 @@ do local has_indent_query = vim.treesitter.query.get(language, 'indents') ~= nil -- Enable treesitter based indentation - if has_indent_query then vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" end + --if has_indent_query then vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" end end local available_parsers = require('nvim-treesitter').get_available() @@ -960,17 +963,17 @@ do -- Here are some example plugins that I've included in the Kickstart repository. -- Uncomment any of the lines below to enable them (you will need to restart nvim). -- - -- require 'kickstart.plugins.debug' - -- require 'kickstart.plugins.indent_line' - -- require 'kickstart.plugins.lint' - -- require 'kickstart.plugins.autopairs' - -- require 'kickstart.plugins.neo-tree' - -- require 'kickstart.plugins.gitsigns' -- adds gitsigns recommended keymaps + require 'kickstart.plugins.debug' + require 'kickstart.plugins.indent_line' + require 'kickstart.plugins.lint' + require 'kickstart.plugins.autopairs' + require 'kickstart.plugins.neo-tree' + require 'kickstart.plugins.gitsigns' -- adds gitsigns recommended keymaps -- NOTE: You can add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. - -- require 'custom.plugins' + require 'custom.plugins' end -- The line beneath this is called `modeline`. See `:help modeline` diff --git a/lua/custom/plugins/gruvbox.lua b/lua/custom/plugins/gruvbox.lua new file mode 100644 index 00000000..7b0f210a --- /dev/null +++ b/lua/custom/plugins/gruvbox.lua @@ -0,0 +1,30 @@ +vim.pack.add({ + "https://github.com/ellisonleao/gruvbox.nvim" +}) + +-- Default options: +require("gruvbox").setup({ + terminal_colors = true, -- add neovim terminal colors + undercurl = true, + underline = true, + bold = true, + italic = { + strings = true, + emphasis = true, + comments = true, + operators = false, + folds = true, + }, + strikethrough = true, + invert_selection = false, + invert_signs = false, + invert_tabline = false, + inverse = true, -- invert background for search, diffs, statuslines and errors + contrast = "", -- can be "hard", "soft" or empty string + palette_overrides = {}, + overrides = {}, + dim_inactive = false, + transparent_mode = false, +}) +vim.cmd("colorscheme gruvbox") +