This commit is contained in:
2025-08-11 14:33:00 -07:00
parent 9a6ef5beb4
commit 97d8c5d5d8
8 changed files with 51 additions and 125 deletions

View File

@@ -20,6 +20,7 @@ require("lazy").setup({
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
lazy = false,
},
{
"rose-pine/neovim",
@@ -41,6 +42,20 @@ require("lazy").setup({
opts = {},
lazy = false,
},
{
"folke/which-key.nvim",
event = "VeryLazy",
init = function()
vim.o.timeout = true
vim.o.timeoutlen = 300
end,
opts = {
preset = "helix",
triggers = {
{ "<auto>", mode = "nixsotc" },
},
},
},
{ "lewis6991/gitsigns.nvim" },
{ "neovim/nvim-lspconfig" },
{ "hrsh7th/nvim-cmp" },
@@ -65,7 +80,7 @@ cmp.setup({
["<Tab>"] = cmp.mapping.select_next_item(),
["<C-d>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
-- ["<C-Space>"] = cmp.mapping.complete(),
["<C-Space>"] = cmp.mapping.close(),
["<CR>"] = cmp.mapping.confirm({ select = true }),
},
@@ -77,6 +92,13 @@ cmp.setup({
},
})
require("nvim-treesitter.configs").setup({
ensure_installed = { "go", "html", "css", "javascript", "hyprlang", "sql", "gomod", "gosum", "bash", "c", "rust" },
highlight = {
enable = true,
},
})
-- nvim-lspconfig - Providing basic, default Nvim LSP client configurations for various LSP servers.
local lspconfig = require("lspconfig")
lspconfig.pyright.setup({})
@@ -90,10 +112,24 @@ require("luasnip").config.set_config({
updateevents = "TextChanged,TextChangedI",
})
-- line numbers
-- native vim options
local vim = vim
local opt = vim.opt
opt.foldmethod = "expr"
opt.foldexpr = "nvim_treesitter#foldexpr()"
vim.wo.number = true
vim.wo.relativenumber = true
opt.tabstop = 2
opt.shiftwidth = 2
opt.expandtab = true
vim.keymap.set("ca", "o", "tabnew")
vim.cmd("autocmd BufReadPost,FileReadPost * normal zR")
-- Comment.vim - Smart and Powerful commenting plugin for neovim
require("Comment").setup()
@@ -145,14 +181,3 @@ vim.api.nvim_create_autocmd({ "InsertLeave", "FocusLost" }, {
vim.cmd("silent! write")
end,
})
-- aliases
vim.keymap.set("ca", "o", "tabnew")
-- remove editor background
-- vim.cmd([[
-- highlight Normal guibg=none
-- highlight NonText guibg=none
-- highlight Normal ctermbg=none
-- highlight NonText ctermbg=none
-- ]])