From 6230032b643242d19d82b8c5cac16d7f8d5a8e73 Mon Sep 17 00:00:00 2001 From: fine2006 Date: Mon, 27 Nov 2023 17:49:25 +0530 Subject: [PATCH 1/5] initial commit --- init.lua | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index e7f1eec416d..c3795f5d93c 100644 --- a/init.lua +++ b/init.lua @@ -154,10 +154,10 @@ require('lazy').setup({ { -- Theme inspired by Atom - 'navarasu/onedark.nvim', + 'shatur/neovim-ayu', priority = 1000, config = function() - vim.cmd.colorscheme 'onedark' + vim.cmd.colorscheme 'ayu-dark' end, }, @@ -168,7 +168,7 @@ require('lazy').setup({ opts = { options = { icons_enabled = false, - theme = 'onedark', + theme = 'ayu', component_separators = '|', section_separators = '', }, @@ -606,3 +606,23 @@ cmp.setup { -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et + +{ + 'glacambre/firenvim', + + -- Lazy load firenvim + -- Explanation: https://github.com/folke/lazy.nvim/discussions/463#discussioncomment-4819297 + lazy = not vim.g.started_by_firenvim, + build = function() + vim.fn["firenvim#install"](0) + end +}{ + 'glacambre/firenvim', + + -- Lazy load firenvim + -- Explanation: https://github.com/folke/lazy.nvim/discussions/463#discussioncomment-4819297 + lazy = not vim.g.started_by_firenvim, + build = function() + vim.fn["firenvim#install"](0) + end +} From 1da93c5a7fec28f7865fa55b2339f1245284d98d Mon Sep 17 00:00:00 2001 From: fine2006 Date: Mon, 27 Nov 2023 20:54:23 +0530 Subject: [PATCH 2/5] add firenvim --- init.lua | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/init.lua b/init.lua index c3795f5d93c..20bf426b50b 100644 --- a/init.lua +++ b/init.lua @@ -76,6 +76,7 @@ require('lazy').setup({ -- Detect tabstop and shiftwidth automatically 'tpope/vim-sleuth', + -- NOTE: This is where your plugins related to LSP can be installed. -- The configuration is done below. Search for lspconfig to find it below. { @@ -94,6 +95,17 @@ require('lazy').setup({ 'folke/neodev.nvim', }, }, + { + 'glacambre/firenvim', + + -- Lazy load firenvim + -- Explanation: https://github.com/folke/lazy.nvim/discussions/463#discussioncomment-4819297 + lazy = not vim.g.started_by_firenvim, + build = function() + vim.fn["firenvim#install"](0) + end + }, + { -- Autocompletion @@ -606,23 +618,3 @@ cmp.setup { -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et - -{ - 'glacambre/firenvim', - - -- Lazy load firenvim - -- Explanation: https://github.com/folke/lazy.nvim/discussions/463#discussioncomment-4819297 - lazy = not vim.g.started_by_firenvim, - build = function() - vim.fn["firenvim#install"](0) - end -}{ - 'glacambre/firenvim', - - -- Lazy load firenvim - -- Explanation: https://github.com/folke/lazy.nvim/discussions/463#discussioncomment-4819297 - lazy = not vim.g.started_by_firenvim, - build = function() - vim.fn["firenvim#install"](0) - end -} From 21c4cd26a0f4a7ad534fee036e3dec9b9ac648cf Mon Sep 17 00:00:00 2001 From: fine2006 Date: Mon, 27 Nov 2023 20:59:15 +0530 Subject: [PATCH 3/5] remove firenvim --- init.lua | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/init.lua b/init.lua index 20bf426b50b..6f0b431509a 100644 --- a/init.lua +++ b/init.lua @@ -95,17 +95,6 @@ require('lazy').setup({ 'folke/neodev.nvim', }, }, - { - 'glacambre/firenvim', - - -- Lazy load firenvim - -- Explanation: https://github.com/folke/lazy.nvim/discussions/463#discussioncomment-4819297 - lazy = not vim.g.started_by_firenvim, - build = function() - vim.fn["firenvim#install"](0) - end - }, - { -- Autocompletion From 3213747de1660e155a4f53cdb3332d4ed4b5b8ce Mon Sep 17 00:00:00 2001 From: fine2006 Date: Mon, 27 Nov 2023 23:53:47 +0530 Subject: [PATCH 4/5] initial customization --- init.lua | 91 +++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 74 insertions(+), 17 deletions(-) diff --git a/init.lua b/init.lua index 6f0b431509a..5934cd8f1c0 100644 --- a/init.lua +++ b/init.lua @@ -113,7 +113,7 @@ require('lazy').setup({ }, -- Useful plugin to show you pending keybinds. - { 'folke/which-key.nvim', opts = {} }, + { 'folke/which-key.nvim', opts = {} }, { -- Adds git related signs to the gutter, as well as utilities for managing changes 'lewis6991/gitsigns.nvim', @@ -153,29 +153,37 @@ require('lazy').setup({ }, }, - { - -- Theme inspired by Atom - 'shatur/neovim-ayu', - priority = 1000, - config = function() - vim.cmd.colorscheme 'ayu-dark' - end, - }, - { -- Set lualine as statusline 'nvim-lualine/lualine.nvim', + dependencies = { + 'nvim-tree/nvim-web-devicons' + }, -- See `:help lualine.txt` + opts = { options = { - icons_enabled = false, - theme = 'ayu', + icons_enabled = true, + theme = 'powerline_dark', component_separators = '|', section_separators = '', }, }, }, + { + "tiagovla/tokyodark.nvim", + opts = { + -- custom options here + }, + config = function(_, opts) + require("tokyodark").setup(opts) -- calling setup is optional + vim.cmd [[colorscheme tokyodark]] + end, + + + + }, { -- Add indentation guides even on blank lines 'lukas-reineke/indent-blankline.nvim', @@ -221,8 +229,8 @@ require('lazy').setup({ -- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart -- These are some example plugins that I've included in the kickstart repository. -- Uncomment any of the lines below to enable them. - -- require 'kickstart.plugins.autoformat', - -- require 'kickstart.plugins.debug', + require 'kickstart.plugins.autoformat', + require 'kickstart.plugins.debug', -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- You can use this folder to prevent any conflicts with this init.lua if you're interested in keeping @@ -230,7 +238,7 @@ require('lazy').setup({ -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. -- -- For additional information see: https://github.com/folke/lazy.nvim#-structuring-your-plugins - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, }, {}) -- [[ Setting options ]] @@ -241,7 +249,8 @@ require('lazy').setup({ vim.o.hlsearch = false -- Make line numbers default -vim.wo.number = true +vim.wo.relativenumber = true +vim.wo.cursorline = true -- Enable mouse mode vim.o.mouse = 'a' @@ -290,6 +299,11 @@ vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnos vim.keymap.set('n', 'e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' }) vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' }) +-- Set up number line + + + + -- [[ Highlight on yank ]] -- See `:help vim.highlight.on_yank()` local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true }) @@ -346,7 +360,7 @@ local function live_grep_git_root() local git_root = find_git_root() if git_root then require('telescope.builtin').live_grep({ - search_dirs = {git_root}, + search_dirs = { git_root }, }) end end @@ -364,6 +378,8 @@ vim.keymap.set('n', '/', function() }) end, { desc = '[/] Fuzzily search in current buffer' }) + + vim.keymap.set('n', 'gf', require('telescope.builtin').git_files, { desc = 'Search [G]it [F]iles' }) vim.keymap.set('n', 'sf', require('telescope.builtin').find_files, { desc = '[S]earch [F]iles' }) vim.keymap.set('n', 'sh', require('telescope.builtin').help_tags, { desc = '[S]earch [H]elp' }) @@ -605,5 +621,46 @@ cmp.setup { }, } +require('lualine').setup { + options = { + icons_enabled = true, + theme = 'auto', + component_separators = { left = '>', right = '<' }, + section_separators = { left = '', right = '' }, + disabled_filetypes = { + statusline = {}, + winbar = {}, + }, + ignore_focus = {}, + always_divide_middle = true, + globalstatus = false, + refresh = { + statusline = 1000, + tabline = 1000, + winbar = 1000, + } + }, + sections = { + lualine_a = { 'mode' }, + lualine_b = { 'branch', 'diff', 'diagnostics' }, + lualine_c = { 'filename' }, + lualine_x = { 'encoding', 'fileformat', 'filetype' }, + lualine_y = { 'progress' }, + lualine_z = { 'location' } + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { 'filename' }, + lualine_x = { 'location' }, + lualine_y = {}, + lualine_z = {} + }, + tabline = {}, + winbar = {}, + inactive_winbar = {}, + extensions = {} +} + -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et From 8dc7791782c00ff88970095d869483944f5774ef Mon Sep 17 00:00:00 2001 From: fine2006 Date: Tue, 28 Nov 2023 14:14:09 +0530 Subject: [PATCH 5/5] update gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index d699e1d68cc..ea93edad490 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ tags test.sh .luarc.json nvim +lazy-lock.json