From 20d6214a01dc1ba431a8a42879796f112be25a54 Mon Sep 17 00:00:00 2001 From: Saumit Dinesan Date: Sun, 4 Sep 2022 03:49:25 +0530 Subject: plugins+tokyonightcolorscheme+treesitter-config --- .config/nvim/lua/justsaumit/colorscheme.lua | 16 +++++++ .config/nvim/lua/justsaumit/options.lua | 4 +- .config/nvim/lua/justsaumit/plugins.lua | 58 +++++++++++++++++++++++ .config/nvim/lua/justsaumit/treesitter-config.lua | 17 +++++++ 4 files changed, 93 insertions(+), 2 deletions(-) create mode 100644 .config/nvim/lua/justsaumit/colorscheme.lua create mode 100644 .config/nvim/lua/justsaumit/plugins.lua create mode 100644 .config/nvim/lua/justsaumit/treesitter-config.lua (limited to '.config/nvim/lua') diff --git a/.config/nvim/lua/justsaumit/colorscheme.lua b/.config/nvim/lua/justsaumit/colorscheme.lua new file mode 100644 index 0000000..f4493b2 --- /dev/null +++ b/.config/nvim/lua/justsaumit/colorscheme.lua @@ -0,0 +1,16 @@ +--configuration needs to be set BEFORE loading the color scheme with colorscheme tokyonight +vim.g.tokyonight_style = "night" +tokyonight_terminal_colors=true +tokyonight_italic_comments=true +tokyonight_italic_keywords=true +tokyonight_italic_functions=false +tokyonight_italic_variables=false +tokyonight_transparent=false +tokyonight_hide_inactive_statusline=false +tokyonight_sidebars={} +tokyonight_transparent_sidebar=false +tokyonight_dark_sidebar=true +tokyonight_dark_float=true +tokyonight_colors={} +tokyonight_lualine_bold=false +vim.cmd[[colorscheme tokyonight]] diff --git a/.config/nvim/lua/justsaumit/options.lua b/.config/nvim/lua/justsaumit/options.lua index 30dbe9c..3496b2c 100644 --- a/.config/nvim/lua/justsaumit/options.lua +++ b/.config/nvim/lua/justsaumit/options.lua @@ -27,7 +27,7 @@ local options = { --undo/backup backup=false, swapfile=false, - undodir=os.getenv("HOME") .. "/.config/nvim/undodir", + undodir=os.getenv("HOME") .. "/.local/state/nvim/undodir", undofile=true } --forloop for table 'options' @@ -36,4 +36,4 @@ for key, value in pairs(options) do end --to 'cw/'dw' a word containing '-' in between ---vim.cmd [[set iskeyword+=-]] +vim.cmd [[set iskeyword+=-]] diff --git a/.config/nvim/lua/justsaumit/plugins.lua b/.config/nvim/lua/justsaumit/plugins.lua new file mode 100644 index 0000000..d9cdd19 --- /dev/null +++ b/.config/nvim/lua/justsaumit/plugins.lua @@ -0,0 +1,58 @@ +local fn = vim.fn + +-- Automatically install packer +local install_path = fn.stdpath "data" .. "/site/pack/packer/start/packer.nvim" +if fn.empty(fn.glob(install_path)) > 0 then + PACKER_BOOTSTRAP = fn.system { + "git", + "clone", + "--depth", + "1", + "https://github.com/wbthomason/packer.nvim", + install_path, + } + print "Installing packer close and reopen Neovim..." + vim.cmd [[packadd packer.nvim]] +end + +-- Autocommand that reloads neovim whenever you save the plugins.lua file +vim.cmd [[ + augroup packer_user_config + autocmd! + autocmd BufWritePost plugins.lua source | PackerSync + augroup end +]] + +-- Use a protected call so we don't error out! +local status_ok, packer = pcall(require, "packer") +if not status_ok then + return +end + +-- Have packer use a popup window +packer.init { + display = { + open_fn = function() + return require("packer.util").float { border = "rounded" } + end, + }, +} + +--Actual good stuff +--Install all your plugins here +return packer.startup(function(use) +--Necessities + use "wbthomason/packer.nvim" -- Have packer manage itself + use "nvim-lua/popup.nvim" -- An implementation of the Popup API from vim in Neovim + use "nvim-lua/plenary.nvim" -- Useful lua functions used ny lots of plugins +--TreeSitter + use {'nvim-treesitter/nvim-treesitter',run = ':TSUpdate'} +--ColorSchemes + use "folke/tokyonight.nvim" + +-- Automatically set up your configuration after cloning packer.nvim +-- Put this at the end after all plugins + if PACKER_BOOTSTRAP then + require("packer").sync() + end +end) diff --git a/.config/nvim/lua/justsaumit/treesitter-config.lua b/.config/nvim/lua/justsaumit/treesitter-config.lua new file mode 100644 index 0000000..7d54f2a --- /dev/null +++ b/.config/nvim/lua/justsaumit/treesitter-config.lua @@ -0,0 +1,17 @@ +require'nvim-treesitter.configs'.setup { + -- A list of parser names, or "all" + ensure_installed = { "bash", "c", "cpp","lua", "rust", "python", "go","html", "javascript", "latex", "markdown", "solidity", "sxhkdrc" }, + -- Install parsers synchronously (only applied to `ensure_installed`) + sync_install = false, + + -- Automatically install missing parsers when entering buffer + auto_install = true, + + -- List of parsers to ignore installing (for "all") + highlight = { + -- `false` will disable the whole extension + enable = true, + -- Instead of true it can also be a list of languages + additional_vim_regex_highlighting = false, + }, +} -- cgit v1.2.3