Init nvim config files

This commit is contained in:
trueold89 2024-02-11 02:35:11 +03:00
commit 385ab276e2
Signed by: trueold89
GPG Key ID: C122E85DD49E6B30
5 changed files with 152 additions and 0 deletions

12
init.lua Executable file
View File

@ -0,0 +1,12 @@
----------------------
-- Initial Settings --
----------------------
-- Default neovim settings --
require('settings')
-- VimPlug --
require('plugins')
-- KeyMaps --
require('keymaps')

62
lua/bubblesline.lua Executable file
View File

@ -0,0 +1,62 @@
-- Bubbles config for lualine
-- Author: lokesh-krishna
-- MIT license, see LICENSE for more details.
-- stylua: ignore
local colors = {
blue = '#0d73cc',
cyan = '#79dac8',
black = '#181825',
white = '#FFFFFF',
red = '#F38BA8',
violet = '#d183e8',
grey = '#303030',
}
local bubbles_theme = {
normal = {
a = { fg = colors.white, bg = colors.blue},
b = { fg = colors.black, bg = colors.white},
c = { fg = colors.black, bg = colors.white},
},
insert = { a = { fg = colors.white, bg = colors.blue} },
visual = { a = { fg = colors.white, bg = colors.blue} },
replace = { a = { fg = colors.white, bg = colors.blue} },
inactive = {
a = { fg = colors.white, bg = colors.black },
b = { fg = colors.white, bg = colors.black },
c = { fg = colors.black, bg = colors.black },
},
}
require('lualine').setup {
options = {
theme = bubbles_theme,
component_separators = '|',
section_separators = { left = '', right = '' },
},
sections = {
lualine_a = {
{ 'mode', separator = { left = '' }, right_padding = 2 },
},
lualine_b = { 'filename', 'branch' },
lualine_c = { 'fileformat' },
lualine_x = {},
lualine_y = { 'filetype', 'progress' },
lualine_z = {
{ 'location', separator = { right = '' }, left_padding = 2 },
},
},
inactive_sections = {
lualine_a = { 'filename' },
lualine_b = {},
lualine_c = {},
lualine_x = {},
lualine_y = {},
lualine_z = { 'location' },
},
tabline = {},
extensions = {},
}

9
lua/keymaps.lua Executable file
View File

@ -0,0 +1,9 @@
--------------------
-- Custom keymaps --
--------------------
-- NerdTreeToggle --
vim.api.nvim_set_keymap('n','<F1>',':NERDTreeToggle<CR>',{ noremap = true, silent = true })
-- MD --
vim.api.nvim_set_keymap('n','<F5>',':MarkdownPreviewToggle<CR>',{ noremap = true, silent = true })

44
lua/plugins.lua Executable file
View File

@ -0,0 +1,44 @@
---------------------
-- VimPlug Plugins --
---------------------
local vim = vim
local Plug = vim.fn['plug#']
vim.call('plug#begin')
-- Sidebar explorer --
Plug('https://github.com/preservim/nerdtree')
Plug('https://github.com/ryanoasis/vim-devicons')
-- Fast line comment --
Plug('https://github.com/tpope/vim-commentary')
-- Show css colors --
Plug('https://github.com/ap/vim-css-color')
Plug('https://github.com/chrisbra/Colorizer.git')
-- Auto-pairs --
Plug('jiangmiao/auto-pairs')
-- Airline --
Plug('nvim-lualine/lualine.nvim')
Plug('nvim-tree/nvim-web-devicons')
-- BufferLine --
Plug('akinsho/bufferline.nvim', { ['tag'] = '*' })
-- MD --
Plug('iamcco/markdown-preview.nvim', { ['do'] = 'cd app && yarn install' })
vim.call('plug#end')
--------------
-- Settings --
--------------
-- AirLine--
require('bubblesline')
-- BufferLine --
require("bufferline").setup{}

25
lua/settings.lua Executable file
View File

@ -0,0 +1,25 @@
-----------------------------
-- Default Neovim Settings --
-----------------------------
-- Show line numbers --
vim.api.nvim_win_set_option(0, 'number', true)
-- Mouse settings --
vim.opt.mouse = 'a'
-- Syntax highlight --
vim.opt.syntax = 'on'
-- Clipboard settings --
vim.opt.clipboard = 'unnamedplus'
-- Disable Swap --
vim.opt.swapfile = false
-- Tab settings --
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.smartindent = true
vim.opt.cindent = true
vim.opt.expandtab = true