aboutsummaryrefslogtreecommitdiffstats
path: root/config/nvim
diff options
context:
space:
mode:
authorJa.KooLit <85185940+JaKooLit@users.noreply.github.com>2024-08-08 14:12:23 +0000
committerGitHub <noreply@github.com>2024-08-08 14:12:23 +0000
commitd8a3463934bdc6c89a5bbfdce8b2f2325715c8c9 (patch)
treef8b90bb192c86a619c70b5d6359b4387b1b64bb2 /config/nvim
parent41c4923fe79b1462a54881705a580b730405a370 (diff)
parent66cfe8e38194b6c8fcaf1d74aa31b264c79751bc (diff)
Merge pull request #395 from JaKooLit/development
Development to Main in preparation for Hyprland v0.42.0 recently released
Diffstat (limited to 'config/nvim')
-rw-r--r--config/nvim/init.lua16
-rw-r--r--config/nvim/init.vim.txt45
-rw-r--r--config/nvim/lazy-lock.json16
-rw-r--r--config/nvim/lua/plugins.lua2
-rw-r--r--config/nvim/lua/plugins/alpha.lua105
-rw-r--r--config/nvim/lua/plugins/catppuccin.lua13
-rw-r--r--config/nvim/lua/plugins/lsp-config.lua25
-rw-r--r--config/nvim/lua/plugins/lualine.lua10
-rw-r--r--config/nvim/lua/plugins/neo-tree.lua12
-rw-r--r--config/nvim/lua/plugins/telescope.lua13
-rw-r--r--config/nvim/lua/plugins/treesitter.lua12
-rw-r--r--config/nvim/lua/vim-options.lua15
12 files changed, 284 insertions, 0 deletions
diff --git a/config/nvim/init.lua b/config/nvim/init.lua
new file mode 100644
index 00000000..861f3aee
--- /dev/null
+++ b/config/nvim/init.lua
@@ -0,0 +1,16 @@
+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")
+require("vim-options")
+
diff --git a/config/nvim/init.vim.txt b/config/nvim/init.vim.txt
new file mode 100644
index 00000000..2388fe28
--- /dev/null
+++ b/config/nvim/init.vim.txt
@@ -0,0 +1,45 @@
+" Basic Configurations
+" FernuDev Github - https://github.com/Fernu292
+
+set number
+set mouse=a
+syntax enable
+set showcmd
+set encoding=utf-8
+set showmatch
+set relativenumber
+
+set expandtab
+set tabstop=4
+set shiftwidth=0
+set softtabstop=0
+set autoindent
+set smarttab
+
+call plug#begin()
+ Plug 'nvim-lualine/lualine.nvim'
+ Plug 'nvim-tree/nvim-web-devicons'
+ Plug 'navarasu/onedark.nvim'
+ Plug 'catppuccin/nvim', { 'as': 'catppuccin' }
+call plug#end()
+
+" Calling the Lualine pluggin
+
+colorscheme onedark
+
+lua << END
+require('lualine').setup {
+ options = {
+ icons_enabled = true,
+ theme = 'material'
+ }
+}
+
+require('onedark').setup {
+ style = "dark",
+ transparent = true,
+}
+
+require('onedark').load()
+
+END
diff --git a/config/nvim/lazy-lock.json b/config/nvim/lazy-lock.json
new file mode 100644
index 00000000..b26c6d27
--- /dev/null
+++ b/config/nvim/lazy-lock.json
@@ -0,0 +1,16 @@
+{
+ "alpha-nvim": { "branch": "main", "commit": "41283fb402713fc8b327e60907f74e46166f4cfd" },
+ "catppuccin": { "branch": "main", "commit": "894efb557728e532aa98b98029d16907a214ec05" },
+ "lazy.nvim": { "branch": "main", "commit": "dea1f687fe6e15eb3098557a69d44231ebcb6cf5" },
+ "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
+ "mason-lspconfig.nvim": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" },
+ "mason.nvim": { "branch": "main", "commit": "2af3b574b68dc0273c7fb60369f3a48d5a16a857" },
+ "neo-tree.nvim": { "branch": "v3.x", "commit": "29f7c215332ba95e470811c380ddbce2cebe2af4" },
+ "nui.nvim": { "branch": "main", "commit": "a2bc1e9d0359caa5d11ad967cd1e30e8d4676226" },
+ "nvim-lspconfig": { "branch": "master", "commit": "cf97d2485fc3f6d4df1b79a3ea183e24c272215e" },
+ "nvim-treesitter": { "branch": "master", "commit": "d4a888ae3cff358cb239643c45b2b38bb60e29c6" },
+ "nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" },
+ "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
+ "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
+ "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }
+} \ No newline at end of file
diff --git a/config/nvim/lua/plugins.lua b/config/nvim/lua/plugins.lua
new file mode 100644
index 00000000..a2b4f84d
--- /dev/null
+++ b/config/nvim/lua/plugins.lua
@@ -0,0 +1,2 @@
+return {}
+
diff --git a/config/nvim/lua/plugins/alpha.lua b/config/nvim/lua/plugins/alpha.lua
new file mode 100644
index 00000000..a3346f1b
--- /dev/null
+++ b/config/nvim/lua/plugins/alpha.lua
@@ -0,0 +1,105 @@
+--- @type LazyPluginSpec
+return {
+ "goolord/alpha-nvim",
+ event = "VimEnter",
+ dependencies = { "nvim-tree/nvim-web-devicons" },
+ opts = function()
+ local dashboard = require("alpha.themes.dashboard")
+ require("alpha.term")
+ local arttoggle = false
+
+ local logo = {
+ [[ ]],
+ [[ ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ]],
+ [[ ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ]],
+ [[ ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ]],
+ [[ ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ]],
+ [[ ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ]],
+ [[ ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ]],
+ [[ ]],
+ }
+
+ local art = {
+ -- { name, width, height }
+ { "tohru", 62, 17 },
+ }
+
+ if arttoggle == true then
+ dashboard.opts.opts.noautocmd = true
+ dashboard.section.terminal.opts.redraw = true
+ local path = vim.fn.stdpath("config") .. "/assets/"
+ -- local random = math.random(1, #art)
+ local currentart = art[1]
+ dashboard.section.terminal.command = "cat " .. path .. currentart[1]
+
+ dashboard.section.terminal.width = currentart[2]
+ dashboard.section.terminal.height = currentart[3]
+
+ dashboard.opts.layout = {
+ dashboard.section.terminal,
+ { type = "padding", val = 2 },
+ dashboard.section.buttons,
+ dashboard.section.footer,
+ }
+ else
+ dashboard.section.header.val = logo
+ end
+ dashboard.section.buttons.val = {
+ dashboard.button("f", " " .. "Find files", ":Telescope find_files <CR>"),
+ }
+ for _, button in ipairs(dashboard.section.buttons.val) do
+ button.opts.hl = "AlphaButtons"
+ button.opts.hl_shortcut = "AlphaShortcut"
+ end
+ dashboard.section.header.opts.hl = "Function"
+ dashboard.section.buttons.opts.hl = "Identifier"
+ dashboard.section.footer.opts.hl = "Function"
+ dashboard.opts.layout[1].val = 4
+ return dashboard
+ end,
+ config = function(_, dashboard)
+ if vim.o.filetype == "lazy" then
+ vim.cmd.close()
+ vim.api.nvim_create_autocmd("User", {
+ pattern = "AlphaReady",
+ callback = function()
+ require("lazy").show()
+ end,
+ })
+ end
+ require("alpha").setup(dashboard.opts)
+ vim.api.nvim_create_autocmd("User", {
+ pattern = "LazyVimStarted",
+ callback = function()
+ local v = vim.version()
+ local dev = ""
+ if v.prerelease == "dev" then
+ dev = "-dev+" .. v.build
+ else
+ dev = ""
+ end
+ local version = v.major .. "." .. v.minor .. "." .. v.patch .. dev
+ local stats = require("lazy").stats()
+ local plugins_count = stats.loaded .. "/" .. stats.count
+ local ms = math.floor(stats.startuptime + 0.5)
+ local time = vim.fn.strftime("%H:%M:%S")
+ local date = vim.fn.strftime("%d.%m.%Y")
+ local line1 = " " .. plugins_count .. " plugins loaded in " .. ms .. "ms"
+ local line2 = "󰃭 " .. date .. "  " .. time
+ local line3 = " " .. version
+
+ local line1_width = vim.fn.strdisplaywidth(line1)
+ local line2Padded = string.rep(" ", (line1_width - vim.fn.strdisplaywidth(line2)) / 2) .. line2
+ local line3Padded = string.rep(" ", (line1_width - vim.fn.strdisplaywidth(line3)) / 2) .. line3
+
+ dashboard.section.footer.val = {
+ line1,
+ line2Padded,
+ line3Padded,
+ }
+ pcall(vim.cmd.AlphaRedraw)
+ end,
+ })
+ end,
+}
+
diff --git a/config/nvim/lua/plugins/catppuccin.lua b/config/nvim/lua/plugins/catppuccin.lua
new file mode 100644
index 00000000..6d05f984
--- /dev/null
+++ b/config/nvim/lua/plugins/catppuccin.lua
@@ -0,0 +1,13 @@
+return {
+ "catppuccin/nvim",
+ lazy = false,
+ name = "catppuccin",
+ priority = 1000,
+ config = function()
+ require("catppuccin").setup({
+ transparent_background = true,
+ })
+ vim.cmd.colorscheme "catppuccin"
+ end
+}
+
diff --git a/config/nvim/lua/plugins/lsp-config.lua b/config/nvim/lua/plugins/lsp-config.lua
new file mode 100644
index 00000000..f41e7984
--- /dev/null
+++ b/config/nvim/lua/plugins/lsp-config.lua
@@ -0,0 +1,25 @@
+return {
+ {
+ "williamboman/mason.nvim",
+ config = function()
+ require("mason").setup()
+ end
+ },
+ {
+ "williamboman/mason-lspconfig.nvim",
+ config = function()
+ require("mason-lspconfig").setup({
+ ensure_installed = {"lua_ls", "clangd", "cmake", "cssls", "html"}
+ })
+ end
+ },
+ {
+ "neovim/nvim-lspconfig",
+ config = function()
+ local lspconfig = require("lspconfig")
+ lspconfig.lua_ls.setup({})
+ vim.keymap.set('n', 'K', vim.lsp.buf.hover, {})
+ end
+ }
+}
+
diff --git a/config/nvim/lua/plugins/lualine.lua b/config/nvim/lua/plugins/lualine.lua
new file mode 100644
index 00000000..bf5923d6
--- /dev/null
+++ b/config/nvim/lua/plugins/lualine.lua
@@ -0,0 +1,10 @@
+return {
+ 'nvim-lualine/lualine.nvim',
+ config = function()
+ require('lualine').setup({
+ options = {
+ theme = 'dracula'
+ }
+ })
+ end
+}
diff --git a/config/nvim/lua/plugins/neo-tree.lua b/config/nvim/lua/plugins/neo-tree.lua
new file mode 100644
index 00000000..da29ce40
--- /dev/null
+++ b/config/nvim/lua/plugins/neo-tree.lua
@@ -0,0 +1,12 @@
+return {
+ "nvim-neo-tree/neo-tree.nvim",
+ branch = "v3.x",
+ dependencies = {
+ "nvim-lua/plenary.nvim",
+ "nvim-tree/nvim-web-devicons",
+ "MunifTanjim/nui.nvim",
+ },
+ config = function()
+ vim.keymap.set('n', '<C-n>', ':Neotree filesystem reveal left<CR>', {})
+ end
+}
diff --git a/config/nvim/lua/plugins/telescope.lua b/config/nvim/lua/plugins/telescope.lua
new file mode 100644
index 00000000..7282f2cb
--- /dev/null
+++ b/config/nvim/lua/plugins/telescope.lua
@@ -0,0 +1,13 @@
+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, {})
+ end
+ },
+ {
+ "nvim-telescope/telescope-ui-select.nvim"
+ }
+}
diff --git a/config/nvim/lua/plugins/treesitter.lua b/config/nvim/lua/plugins/treesitter.lua
new file mode 100644
index 00000000..20063418
--- /dev/null
+++ b/config/nvim/lua/plugins/treesitter.lua
@@ -0,0 +1,12 @@
+return {
+ "nvim-treesitter/nvim-treesitter",
+ build = ":TSUpdate",
+ config = function()
+ local configs = require("nvim-treesitter.configs")
+ configs.setup({
+ ensure_installed = {"lua", "c", "javascript"},
+ highlight = { enable = true },
+ indent = { enable = true }
+ })
+ end
+}
diff --git a/config/nvim/lua/vim-options.lua b/config/nvim/lua/vim-options.lua
new file mode 100644
index 00000000..d28b7e8f
--- /dev/null
+++ b/config/nvim/lua/vim-options.lua
@@ -0,0 +1,15 @@
+vim.cmd("set number")
+vim.cmd("set mouse=a")
+vim.cmd("syntax enable")
+vim.cmd("set showcmd")
+vim.cmd("set encoding=utf-8")
+vim.cmd("set showmatch")
+vim.cmd("set relativenumber")
+vim.cmd("set expandtab")
+vim.cmd("set tabstop=4")
+vim.cmd("set shiftwidth=0")
+vim.cmd("set softtabstop=0")
+vim.cmd("set autoindent")
+vim.cmd("set smarttab")
+vim.keymap.set('n', '<C-h>', '<C-w>h', {})
+vim.keymap.set('n', '<C-l>', '<C-w>l',{})
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage