summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2023-07-15 01:40:37 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2023-07-15 01:40:37 +0530
commita8ea70cb0592f207f22dfb9e3beb2603adbd9ebf (patch)
tree067630ca5afcffa001fc81e5331654791d92e9d1
parent0cc4ed7dd6fc5b06de245246723138996d449571 (diff)
nvim: Adding catpuccin theme and telescope nvim
-rw-r--r--.config/nvim/init.lua1
-rw-r--r--.config/nvim/lua/justsaumit/plugins.lua5
-rw-r--r--.config/nvim/lua/justsaumit/telescope-config.lua52
-rw-r--r--.config/nvim/lua/justsaumit/treesitter-config.lua2
-rw-r--r--.config/nvim/lua/justsaumit/which-key-config.lua6
-rw-r--r--.config/nvim/plugin/packer_compiled.lua10
6 files changed, 71 insertions, 5 deletions
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua
index eccbfdf..0f2c159 100644
--- a/.config/nvim/init.lua
+++ b/.config/nvim/init.lua
@@ -9,4 +9,5 @@ require("justsaumit.nvim-tree-config")
require("justsaumit.lastplace-config")
require("justsaumit.which-key-config")
require("justsaumit.colorizer-config")
+require("justsaumit.telescope-config")
print ("while(!(succeed = try() ) );")
diff --git a/.config/nvim/lua/justsaumit/plugins.lua b/.config/nvim/lua/justsaumit/plugins.lua
index 6a34a50..ae8b42b 100644
--- a/.config/nvim/lua/justsaumit/plugins.lua
+++ b/.config/nvim/lua/justsaumit/plugins.lua
@@ -51,13 +51,14 @@ return packer.startup(function(use)
--ColorSchemes
use "folke/tokyonight.nvim"
use "tiagovla/tokyodark.nvim"
+ use { "catppuccin/nvim", as = "catppuccin" }
use { 'AlphaTechnolog/pywal.nvim', as = 'pywal' }
--Web-devicons
use "kyazdani42/nvim-web-devicons"
--Lualine
use {'nvim-lualine/lualine.nvim', requires = { 'kyazdani42/nvim-web-devicons', opt = true }}
--Bufferline
- use {'akinsho/bufferline.nvim', tag = "v2.*", requires = 'kyazdani42/nvim-web-devicons'}
+ use {'akinsho/bufferline.nvim', tag = "v2.*", requires = 'nvim-tree/nvim-web-devicons'}
--Nvim-tree File explorer for nvim
use {'nvim-tree/nvim-tree.lua', requires = { 'nvim-tree/nvim-web-devicons'}}
--Whick-key - displays a popup with possible key bindings
@@ -66,7 +67,7 @@ return packer.startup(function(use)
-- use 'windwp/nvim-ts-autotag'
--Markdown + Zenmode
--Telescope
--- use {'nvim-telescope/telescope.nvim', tag = '0.1.0', requires = { {'nvim-lua/plenary.nvim'} }}
+ use {'nvim-telescope/telescope.nvim', tag = '0.1.2', requires = { {'nvim-lua/plenary.nvim'} }}
--cmp
-- use 'hrsh7th/nvim-cmp'
--cmp plugins
diff --git a/.config/nvim/lua/justsaumit/telescope-config.lua b/.config/nvim/lua/justsaumit/telescope-config.lua
new file mode 100644
index 0000000..e678792
--- /dev/null
+++ b/.config/nvim/lua/justsaumit/telescope-config.lua
@@ -0,0 +1,52 @@
+local actions = require('telescope.actions')
+require('telescope').setup {
+ defaults = {
+ layout_config = {
+ width = 0.75,
+ prompt_position = "top",
+ preview_cutoff = 120,
+ horizontal = {mirror = false},
+ vertical = {mirror = false}
+ },
+ find_command = {
+ 'rg', '--no-heading', '--with-filename', '--line-number', '--column', '--smart-case'
+ },
+ prompt_prefix = " ",
+ selection_caret = " ",
+ entry_prefix = " ",
+ initial_mode = "insert",
+ selection_strategy = "reset",
+ sorting_strategy = "descending",
+ layout_strategy = "horizontal",
+ file_sorter = require'telescope.sorters'.get_fuzzy_file,
+ file_ignore_patterns = {
+ "node_modules", "build", "dist", "yarn.lock", ".local", ".rustup", ".mozilla",".git"
+ },
+ generic_sorter = require'telescope.sorters'.get_generic_fuzzy_sorter,
+ path_display = {},
+ winblend = 0,
+ border = {},
+ borderchars = {'─', '│', '─', '│', '╭', '╮', '╯', '╰'},
+ color_devicons = true,
+ use_less = true,
+ set_env = {['COLORTERM'] = 'truecolor'}, -- default = nil,
+ file_previewer = require'telescope.previewers'.vim_buffer_cat.new,
+ grep_previewer = require'telescope.previewers'.vim_buffer_vimgrep.new,
+ qflist_previewer = require'telescope.previewers'.vim_buffer_qflist.new,
+ buffer_previewer_maker = require'telescope.previewers'.buffer_previewer_maker,
+ mappings = {
+ i = {
+ ["<C-j>"] = actions.move_selection_next,
+ ["<C-k>"] = actions.move_selection_previous,
+ ["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist,
+ ["<esc>"] = actions.close,
+ ["<CR>"] = actions.select_default + actions.center
+ },
+ n = {
+ ["<C-j>"] = actions.move_selection_next,
+ ["<C-k>"] = actions.move_selection_previous,
+ ["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist
+ }
+ }
+ }
+}
diff --git a/.config/nvim/lua/justsaumit/treesitter-config.lua b/.config/nvim/lua/justsaumit/treesitter-config.lua
index 17dbc62..d2f477f 100644
--- a/.config/nvim/lua/justsaumit/treesitter-config.lua
+++ b/.config/nvim/lua/justsaumit/treesitter-config.lua
@@ -1,6 +1,6 @@
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" },
+ ensure_installed = { "bash", "c", "cpp", "lua", "rust", "python", "go","html", "javascript", "typescript", "latex", "markdown", "solidity", "sxhkdrc" },
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,
diff --git a/.config/nvim/lua/justsaumit/which-key-config.lua b/.config/nvim/lua/justsaumit/which-key-config.lua
index b438f7e..25ec150 100644
--- a/.config/nvim/lua/justsaumit/which-key-config.lua
+++ b/.config/nvim/lua/justsaumit/which-key-config.lua
@@ -4,8 +4,10 @@ local mappings = {
Z = {":wq<CR>", "Save and Quit"},
w = {":w<CR>", "Save"},
x ={":bdelete<CR>", "Close"},
- f = { ":Telescope find_files<cr>", "Telescope Find Files" },
- g = { ":Telescope live_grep<cr>", "Telescope Live Grep" }
+ f = { ":Telescope find_files<CR>", "Telescope Find Files" },
+ h = { ":Telescope find_files hidden=true<CR>", "Telescope Find Files" },
+ g = { ":Telescope live_grep<CR>", "Telescope Live Grep" },
+ r = { ":Telescope oldfiles<CR>", "Recent files" }
}
local opts = {prefix = '<leader>'}
wk.register(mappings, opts)
diff --git a/.config/nvim/plugin/packer_compiled.lua b/.config/nvim/plugin/packer_compiled.lua
index 23f432a..7d9da10 100644
--- a/.config/nvim/plugin/packer_compiled.lua
+++ b/.config/nvim/plugin/packer_compiled.lua
@@ -79,6 +79,11 @@ _G.packer_plugins = {
path = "/home/saumit/.local/share/nvim/site/pack/packer/start/bufferline.nvim",
url = "https://github.com/akinsho/bufferline.nvim"
},
+ catppuccin = {
+ loaded = true,
+ path = "/home/saumit/.local/share/nvim/site/pack/packer/start/catppuccin",
+ url = "https://github.com/catppuccin/nvim"
+ },
["lualine.nvim"] = {
loaded = true,
path = "/home/saumit/.local/share/nvim/site/pack/packer/start/lualine.nvim",
@@ -129,6 +134,11 @@ _G.packer_plugins = {
path = "/home/saumit/.local/share/nvim/site/pack/packer/start/pywal",
url = "https://github.com/AlphaTechnolog/pywal.nvim"
},
+ ["telescope.nvim"] = {
+ loaded = true,
+ path = "/home/saumit/.local/share/nvim/site/pack/packer/start/telescope.nvim",
+ url = "https://github.com/nvim-telescope/telescope.nvim"
+ },
["tokyodark.nvim"] = {
loaded = true,
path = "/home/saumit/.local/share/nvim/site/pack/packer/start/tokyodark.nvim",