Initial commit

This commit is contained in:
Selim Mustafaev 2024-04-15 16:58:49 +03:00
commit ae01124a46
8 changed files with 177 additions and 0 deletions

40
init.lua Normal file
View File

@ -0,0 +1,40 @@
-- tab/indent options
vim.opt.expandtab = false
vim.opt.smarttab = true
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.shiftwidth = 4
vim.opt.smartindent = true
-- enable line numbers
vim.opt.nu = true
vim.opt.relativenumber = true
-- enable 24 bit colors
vim.opt.termguicolors = true
-- disable netrw (will use neotree instead)
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- Lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup("plugins")

13
lazy-lock.json Normal file
View File

@ -0,0 +1,13 @@
{
"lazy.nvim": { "branch": "main", "commit": "31ddbea7c10b6920c9077b66c97951ca8682d5c8" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
"monokai-pro.nvim": { "branch": "master", "commit": "aafde73a622435891d36b411d8623e705ead6293" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "c61074acb19102dfc6f21738dcae4d9a494a8959" },
"noice.nvim": { "branch": "main", "commit": "0cbe3f88d038320bdbda3c4c5c95f43a13c3aa12" },
"nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" },
"nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" },
"nvim-treesitter": { "branch": "master", "commit": "ef267f0c285928ea3a0d3362a260a0728fd4a146" },
"nvim-web-devicons": { "branch": "master", "commit": "6e355632387a085f15a66ad68cf681c1d7374a04" },
"plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" },
"rustaceanvim": { "branch": "master", "commit": "555ba5e2f10626d16d07c58bc5953867505b899e" }
}

31
lua/plugins/lualine.lua Normal file
View File

@ -0,0 +1,31 @@
return {
{
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
dependencies = {
"nvim-tree/nvim-web-devicons"
},
init = function()
vim.g.lualine_laststatus = vim.o.laststatus
if vim.fn.argc(-1) > 0 then
-- set an empty statusline till lualine loads
vim.o.statusline = " "
else
-- hide the statusline on the starter page
vim.o.laststatus = 0
end
end,
config = function()
require("lualine").setup({
options = {
theme = "monokai-pro",
globalstatus = true
},
extensions = {
"lazy",
"neo-tree"
},
})
end
}
}

15
lua/plugins/monokai.lua Normal file
View File

@ -0,0 +1,15 @@
return {
{
"loctvl842/monokai-pro.nvim",
lazy = false,
priority = 1000,
config = function()
require("monokai-pro").setup({
filter = "pro",
--terminal_colors = true,
--transparent_background = true
})
vim.cmd([[colorscheme monokai-pro]])
end
}
}

26
lua/plugins/neotree.lua Normal file
View File

@ -0,0 +1,26 @@
return {
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim"
},
keys = {
{ "<leader>nt", "<cmd>Neotree toggle<cr>", desc = "NeoTree toggle" },
{ "<tab>", "<cmd>Neotree focus<cr>", desc = "NeoTree focus" }
},
config = function(_, opts)
require("neo-tree").setup(opts)
end,
init = function()
if vim.fn.argc(-1) == 1 then
local stat = vim.uv.fs_stat(vim.fn.argv(0))
if stat and stat.type == "directory" then
require("neo-tree")
end
end
end
}
}

20
lua/plugins/noice.lua Normal file
View File

@ -0,0 +1,20 @@
return {
{
"folke/noice.nvim",
event = "VeryLazy",
dependencies = {
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify"
},
config = function()
require("noice").setup({
lsp = {
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true
}
}
})
end
}
}

View File

@ -0,0 +1,7 @@
return {
{
"mrcjkb/rustaceanvim",
version = "^4",
ft = { "rust" }
}
}

View File

@ -0,0 +1,25 @@
return {
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
require("nvim-treesitter.configs").setup({
highlight = { enable = true },
indent = { enable = true },
ensure_installed = {
"c",
"cpp",
"rust",
"javascript",
"lua",
"vim",
"regex",
"bash",
"markdown",
"markdown_inline"
},
auto_install = false
})
end
}
}