summaryrefslogtreecommitdiff
path: root/.config/nvim/lua
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2022-09-04 03:49:25 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2022-09-04 03:49:25 +0530
commit20d6214a01dc1ba431a8a42879796f112be25a54 (patch)
treee1cda2a78d293152c656731c939821f4830478aa /.config/nvim/lua
parent994cb1f91958a02415825a4dda74d18241096805 (diff)
plugins+tokyonightcolorscheme+treesitter-config
Diffstat (limited to '.config/nvim/lua')
-rw-r--r--.config/nvim/lua/justsaumit/colorscheme.lua16
-rw-r--r--.config/nvim/lua/justsaumit/options.lua4
-rw-r--r--.config/nvim/lua/justsaumit/plugins.lua58
-rw-r--r--.config/nvim/lua/justsaumit/treesitter-config.lua17
4 files changed, 93 insertions, 2 deletions
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 <afile> | 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,
+ },
+}