Merge pull request #1 from Nurtrantpoem19/myconfigs

thinkpad configs
This commit is contained in:
Qing Che Yu 2026-06-10 11:54:28 -04:00 committed by GitHub
commit 537b54f18f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 44 additions and 11 deletions

View File

@ -99,7 +99,7 @@ do
vim.g.maplocalleader = ' ' vim.g.maplocalleader = ' '
-- Set to true if you have a Nerd Font installed and selected in the terminal -- 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 ]] -- [[ Setting options ]]
-- See `:help vim.o` -- See `:help vim.o`
@ -778,6 +778,7 @@ do
local enabled_filetypes = { local enabled_filetypes = {
-- lua = true, -- lua = true,
-- python = true, -- python = true,
cpp = true;
} }
if enabled_filetypes[vim.bo[bufnr].filetype] then if enabled_filetypes[vim.bo[bufnr].filetype] then
return { timeout_ms = 500 } return { timeout_ms = 500 }
@ -796,6 +797,8 @@ do
-- --
-- You can use 'stop_after_first' to run the first available formatter from the list -- You can use 'stop_after_first' to run the first available formatter from the list
-- javascript = { "prettierd", "prettier", stop_after_first = true }, -- 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' } } vim.pack.add { { src = gh 'nvim-treesitter/nvim-treesitter', version = 'main' } }
-- Ensure basic parsers are installed -- 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) require('nvim-treesitter').install(parsers)
---@param buf integer ---@param buf integer
---@param language string ---@param language string
local function treesitter_try_attach(buf, language) local function treesitter_try_attach(buf, language)
@ -919,7 +922,7 @@ do
local has_indent_query = vim.treesitter.query.get(language, 'indents') ~= nil local has_indent_query = vim.treesitter.query.get(language, 'indents') ~= nil
-- Enable treesitter based indentation -- 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 end
local available_parsers = require('nvim-treesitter').get_available() 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. -- 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). -- Uncomment any of the lines below to enable them (you will need to restart nvim).
-- --
-- require 'kickstart.plugins.debug' require 'kickstart.plugins.debug'
-- require 'kickstart.plugins.indent_line' require 'kickstart.plugins.indent_line'
-- require 'kickstart.plugins.lint' require 'kickstart.plugins.lint'
-- require 'kickstart.plugins.autopairs' require 'kickstart.plugins.autopairs'
-- require 'kickstart.plugins.neo-tree' require 'kickstart.plugins.neo-tree'
-- require 'kickstart.plugins.gitsigns' -- adds gitsigns recommended keymaps require 'kickstart.plugins.gitsigns' -- adds gitsigns recommended keymaps
-- NOTE: You can add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- 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. -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
-- require 'custom.plugins' require 'custom.plugins'
end end
-- The line beneath this is called `modeline`. See `:help modeline` -- The line beneath this is called `modeline`. See `:help modeline`

View File

@ -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")