~coder_kalyan/dotfiles

65210b951009092bb701127d7a6c042bb24621b5 — Kalyan Sriram 2 months ago f1a67ae master
nvim: new plugins and performance improvements
2 files changed, 101 insertions(+), 13 deletions(-)

M .config/nvim/init.lua
M .config/nvim/lua/plugins.lua
M .config/nvim/init.lua => .config/nvim/init.lua +13 -2
@@ 1,3 1,6 @@
-- plugin startuptime optimizer
require('impatient') -- .enable_profile()

-- packages are managed in ~/.config/nvim/lua/plugins.lua
require('plugins')



@@ 9,11 12,19 @@ vim.o.smartcase = true -- ignore case if search is all lower, else case-sensitiv
vim.o.showmatch = true -- show matching parenthesis

vim.o.termguicolors = true -- enable true colors
vim.cmd('colorscheme palenight')
vim.cmd('colorscheme onedark')
-- vim.cmd('colorscheme tokyonight')

vim.o.mouse = 'a'

vim.o.tabstop=4
vim.o.shiftwidth=4

require('telescope').load_extension('projects')
vim.g.mapleader = " "

vim.g.loaded_python_provider = 0
vim.g.loaded_python3_provider = 0

vim.cmd('au BufReadPre,FileReadPre * lua require(\'lint\').try_lint()')
vim.cmd('au TextChanged <buffer> lua require(\'lint\').try_lint()')
vim.cmd('au BufWritePost <buffer> lua require(\'lint\').try_lint()')

M .config/nvim/lua/plugins.lua => .config/nvim/lua/plugins.lua +88 -11
@@ 10,6 10,9 @@ return require('packer').startup(function(use)
	-- update packer itself
	use 'wbthomason/packer.nvim'

	-- plugin startuptime automizer
	use 'lewis6991/impatient.nvim'

	-- transparent background
	use {
		'xiyaowong/nvim-transparent',


@@ 23,15 26,12 @@ return require('packer').startup(function(use)
	}

	-- color scheme
	use 'drewtempelmeyer/palenight.vim'

	-- status line
	-- use 'drewtempelmeyer/palenight.vim'
	-- use 'marko-cerovac/material.nvim'
	-- use 'folke/tokyonight.nvim'
	use {
		'nvim-lualine/lualine.nvim',
		requires = {'kyazdani42/nvim-web-devicons', opt = true},
		config = function() require('lualine').setup({
			options = {theme = 'palenight'},
		}) end
		'navarasu/onedark.nvim',
		config = function() require('onedark').load() end
	}

	-- color highlighter


@@ 101,6 101,9 @@ return require('packer').startup(function(use)
		end
	}

	-- nested comment syntax context, needs to be loaded before treesitter
	use 'JoosepAlviste/nvim-ts-context-commentstring'

	-- configuration for built in treesitter support (i.e. syntax highlighting)
	use {
		'nvim-treesitter/nvim-treesitter',


@@ 112,14 115,70 @@ return require('packer').startup(function(use)
				enable = true,
				additional_vim_regex_highlighting = false,
			},
			context_commentstring = {
				enable = true,
				enable_autocmd = false,
			},
			indent = {
				enable = true
			},
			incremental_selection = {
				enable = true,
				keymaps = {
					init_selection = "gnn",
					node_incremental = "grn",
					scope_incremental = "grc",
					node_decremental = "grm",
				},
			},
		}) end
	}
	
	-- code refactoring using treesitter
	use 'nvim-treesitter/nvim-treesitter-refactor'

	-- scope context statusline
	use {
		"SmiteshP/nvim-gps",
		requires = "nvim-treesitter/nvim-treesitter",
		config = function() require('nvim-gps').setup() end
	}

	-- status line
	use {
		'nvim-lualine/lualine.nvim',
		requires = {'kyazdani42/nvim-web-devicons', opt = true},
		config = function() 
			local gps = require("nvim-gps")

			require('lualine').setup({
				options = {theme = 'palenight'},
				sections = {
					lualine_c = {
						{ gps.get_location, cond = gps.is_available },
					}
				}
			}) 
		end
	}

	-- comment code
	use 'tpope/vim-commentary'
	use {
		'terrortylor/nvim-comment',
		config = function() require('nvim_comment').setup({
			marker_padding = true,
			comment_empty = false,
			comment_empty_trim_whitespace = true,
			line_mapping = "<leader>cc",
			operator_mapping = "<leader>c",
			comment_chunk_text_object = "ic",
			hook = function()
				require('ts_context_commentstring.internal').update_commentstring()
			end
		}) end
	}

	-- additional filetypes
<<<<<<< Updated upstream
	use 'nathom/filetype.nvim'

	-- project management


@@ 136,6 195,7 @@ return require('packer').startup(function(use)
		requires = {
			{'nvim-lua/plenary.nvim'}
		},
		config = function() require('telescope').load_extension('projects') end
	}

	use {


@@ 149,5 209,22 @@ return require('packer').startup(function(use)
		run = function() vim.fn['firenvim#install'](0) end
	}

	use "nathom/filetype.nvim"
	-- asynchronous linting with lsp
	use {
		'mfussenegger/nvim-lint',
		config = function() require('lint').linters_by_ft = {
			python = {'flake8',},
			c = {'clangtidy',},
			markdown = {'vale',},
		} end
	}

	use {
		"folke/which-key.nvim",
		config = function()
			require("which-key").setup {
				-- default configuration for now
			}
		end
	}
end)