Merge pull request 'Neovim Addition' (#14) from nvim-addition into main

Reviewed-on: #14
This commit was merged in pull request #14.
This commit is contained in:
2024-08-02 18:33:48 +00:00
7 changed files with 71 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
nvim/dot-config/nvim/lazy-lock.json

View File

@@ -0,0 +1,19 @@
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
require("vim-options")
require("lazy").setup("plugins")

View File

@@ -0,0 +1,13 @@
return {
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
-- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
},
config = function()
vim.keymap.set('n', '<leader>fe', ':Neotree filesystem reveal toggle left<CR>', {})
end
}

View File

@@ -0,0 +1,9 @@
return {
'nvim-telescope/telescope.nvim', tag = '0.1.8',
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<C-p>', builtin.find_files, {})
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
end
}

View File

@@ -0,0 +1,10 @@
return {
"folke/tokyonight.nvim",
lazy = false,
priority = 1000,
opts = {},
config = function()
vim.cmd.colorscheme "tokyonight-storm"
end
}

View File

@@ -0,0 +1,12 @@
return{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
local configs = require("nvim-treesitter.configs")
configs.setup({
ensure_installed = { "c", "cmake", "cpp", "lua", "python", "rust", "toml" },
highlight = { enable = true },
indent = { enable = true },
})
end
}

View File

@@ -0,0 +1,7 @@
vim.cmd("set shiftwidth=2")
vim.cmd("set tabstop=2")
vim.g.mapleader = " "
vim.wo.relativenumber = true
vim.wo.number = true
vim.cmd("set list")