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:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
nvim/dot-config/nvim/lazy-lock.json
|
||||||
19
nvim/dot-config/nvim/init.lua
Normal file
19
nvim/dot-config/nvim/init.lua
Normal 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")
|
||||||
13
nvim/dot-config/nvim/lua/plugins/neotree.lua
Normal file
13
nvim/dot-config/nvim/lua/plugins/neotree.lua
Normal 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
|
||||||
|
}
|
||||||
9
nvim/dot-config/nvim/lua/plugins/telescope.lua
Normal file
9
nvim/dot-config/nvim/lua/plugins/telescope.lua
Normal 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
|
||||||
|
}
|
||||||
10
nvim/dot-config/nvim/lua/plugins/tokyonight.lua
Normal file
10
nvim/dot-config/nvim/lua/plugins/tokyonight.lua
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
return {
|
||||||
|
"folke/tokyonight.nvim",
|
||||||
|
lazy = false,
|
||||||
|
priority = 1000,
|
||||||
|
opts = {},
|
||||||
|
config = function()
|
||||||
|
vim.cmd.colorscheme "tokyonight-storm"
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
12
nvim/dot-config/nvim/lua/plugins/treesitter.lua
Normal file
12
nvim/dot-config/nvim/lua/plugins/treesitter.lua
Normal 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
|
||||||
|
}
|
||||||
7
nvim/dot-config/nvim/lua/vim-options.lua
Normal file
7
nvim/dot-config/nvim/lua/vim-options.lua
Normal 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")
|
||||||
|
|
||||||
Reference in New Issue
Block a user