commit 385ab276e275747cba241d250c3753e4da8d23d1 Author: trueold89 Date: Sun Feb 11 02:35:11 2024 +0300 Init nvim config files diff --git a/init.lua b/init.lua new file mode 100755 index 0000000..f55e235 --- /dev/null +++ b/init.lua @@ -0,0 +1,12 @@ +---------------------- +-- Initial Settings -- +---------------------- + +-- Default neovim settings -- +require('settings') + +-- VimPlug -- +require('plugins') + +-- KeyMaps -- +require('keymaps') diff --git a/lua/bubblesline.lua b/lua/bubblesline.lua new file mode 100755 index 0000000..78e3c99 --- /dev/null +++ b/lua/bubblesline.lua @@ -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 = {}, +} diff --git a/lua/keymaps.lua b/lua/keymaps.lua new file mode 100755 index 0000000..c165f0e --- /dev/null +++ b/lua/keymaps.lua @@ -0,0 +1,9 @@ +-------------------- +-- Custom keymaps -- +-------------------- + +-- NerdTreeToggle -- +vim.api.nvim_set_keymap('n','',':NERDTreeToggle',{ noremap = true, silent = true }) + +-- MD -- +vim.api.nvim_set_keymap('n','',':MarkdownPreviewToggle',{ noremap = true, silent = true }) diff --git a/lua/plugins.lua b/lua/plugins.lua new file mode 100755 index 0000000..ac80b98 --- /dev/null +++ b/lua/plugins.lua @@ -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{} diff --git a/lua/settings.lua b/lua/settings.lua new file mode 100755 index 0000000..7098c7b --- /dev/null +++ b/lua/settings.lua @@ -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