This commit is contained in:
marvelman3284 2021-04-05 23:21:58 -04:00
commit 227e6d7116
15 changed files with 186 additions and 281 deletions

View File

@ -65,6 +65,30 @@ without Treesitter :
with Treesitter : with Treesitter :
<kbd> <img src = "https://raw.githubusercontent.com/siduck76/dotfiles/master/rice%20flex/wiTree.png"></kbd><hr> <kbd> <img src = "https://raw.githubusercontent.com/siduck76/dotfiles/master/rice%20flex/wiTree.png"></kbd><hr>
### nvim-base16 -
contains a collection of all base16 themes for vim , plugin written in lua (comparison of base16-vim and nvim-base16):
nvim-base16 doesnt even take time to load unlike base16-vim which was eating half of the loadup time! ( the below screenshot was taken and tested on my old pentium laptop , so results might differ)
<kbd> <img src = "https://raw.githubusercontent.com/siduck76/dotfiles/master/rice%20flex/nvim-base16.png"></kbd><hr>
(neovim loads pretty fast on ssds)
<kbd> <img src = "https://raw.githubusercontent.com/siduck76/dotfiles/master/rice%20flex/nvim-startup.png"></kbd><hr>
# Config structure
```
nvim
├──init.lua
└──lua
└──foo
└──lua.lua
```
- The init.lua is used instead of init.vim.
- The lua folder contains modules , in the example above "foo" could be considered as a module and it contains a lua.lua file in which you could write your config in lua , its like splitting the overall config into small bit . To load/source that "foo" module , you need to specify it in init.lua like this : require('foo.lua').
# Features # Features
- File navigation with Nvimtree - File navigation with Nvimtree
@ -99,7 +123,9 @@ with Treesitter :
# Clone my setup - # Clone my setup -
- Install neovim-nightly , also use a nerdfont on your terminal. - Install neovim-nightly , also use a nerdfont on your terminal.
- run the install.sh script as root or copy the configs manually : - run the install.sh (this might work only on nix systems) and open neovim , do :PackerInstall
- or do it manually :
- Install packer.nvim - Install packer.nvim
```shell ```shell
@ -107,9 +133,9 @@ git clone https://github.com/wbthomason/packer.nvim\
~/.local/share/nvim/site/pack/packer/start/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim
``` ```
- copy all config files in from this repo except ( plugin folder as it has config related to my system's username! ) - copy lua folder and init.lua into ~/.config/nvim
- Open neovim and install all plugins , :PackerInstall and :TSUpdate - Open neovim and install all plugins , :PackerInstall (let treesitter install all its extensionsm
- Install language servers and prettier ( for autocompletion etc and code formatting , nodejs should be installed too!) - Install language servers and prettier ( for autocompletion etc and code formatting , nodejs should be installed too!) , this usually depends on the language support you want to add in your neovim config.
``` ```
sudo npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier sudo npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier
@ -130,7 +156,7 @@ I'd install it first and add its setup line :
<kbd> space </kbd> is the leader key <kbd> space </kbd> is the leader key
- <kbd> Ctrl </kbd> <kbd> b </kbd> Open terminal vertically over right - <kbd> Ctrl </kbd> <kbd> l </kbd> Open terminal vertically over right
- <kbd> Ctrl </kbd> <kbd> x </kbd> Open terminal horizontally below the current window - <kbd> Ctrl </kbd> <kbd> x </kbd> Open terminal horizontally below the current window
- <kbd> Ctrl </kbd> <kbd> n </kbd> toggle neovim tree - <kbd> Ctrl </kbd> <kbd> n </kbd> toggle neovim tree
- <kbd> Ctrl </kbd> <kbd> a </kbd> copies everything in the current file - <kbd> Ctrl </kbd> <kbd> a </kbd> copies everything in the current file
@ -150,13 +176,6 @@ I'd install it first and add its setup line :
- add snippets support - add snippets support
- show statusline in inactive windows - show statusline in inactive windows
# Troubleshooting -
![image](https://user-images.githubusercontent.com/59060246/111059898-f096cf00-84be-11eb-977a-f91d622ee5b9.png)
if you get any errors with packer.nvim , then remove the ~/.config/nvim/plugin/packer_nvim.vim file since it just has file paths for my system
and re-install packer.nvim
# Contact - # Contact -
- My linux / unix related ricing community: https://t.me/DE_WM (telegram) - My linux / unix related ricing community: https://t.me/DE_WM (telegram)

View File

@ -1,19 +1,19 @@
-- load all plugins -- load all plugins
require("pluginsList.lua") require("pluginsList.lua")
require("web-devicons.lua") require("file-icons.lua")
require("utils.lua") require("misc-utils.lua")
require("nvimTree.lua") require("nvimTree.lua")
require("bufferline.lua") require("bufferline.lua")
require("statusline.lua") require("statusline.lua")
require("telescope-nvim.lua") require("telescope.lua")
require("gitsigns.lua") require("gitsigns.lua")
require "colorizer".setup() require "colorizer".setup()
-- lsp -- lsp
require("nvim-lspconfig.lua") require("lspconfig.lua")
require("nvim-compe.lua") require("compe.lua")
local cmd = vim.cmd local cmd = vim.cmd
local g = vim.g local g = vim.g
@ -21,12 +21,14 @@ local g = vim.g
g.mapleader = " " g.mapleader = " "
g.auto_save = 1 g.auto_save = 1
-- colorscheme -- colorscheme related stuff
cmd "colorscheme base16-onedark"
cmd "syntax enable" cmd "syntax enable"
cmd "syntax on" cmd "syntax on"
local base16 = require "base16"
base16(base16.themes["onedark"], true)
-- blankline -- blankline
local indent = 2 local indent = 2
@ -34,34 +36,40 @@ local indent = 2
g.indentLine_enabled = 1 g.indentLine_enabled = 1
g.indent_blankline_char = "" g.indent_blankline_char = ""
cmd("hi IndentBlanklineChar guifg=#373b43") cmd("hi IndentBlanklineChar guifg=#2a2e36")
g.indent_blankline_filetype_exclude = {"help", "terminal"} g.indent_blankline_filetype_exclude = {"help", "terminal"}
g.indent_blankline_buftype_exclude = {"terminal"}
g.indent_blankline_show_trailing_blankline_indent = false g.indent_blankline_show_trailing_blankline_indent = false
g.indent_blankline_show_first_indent_level = false g.indent_blankline_show_first_indent_level = false
require("treesitter.lua") require("treesitter.lua")
require("mappings.lua") require("mappings.lua")
-- highlights -- highlights --
cmd("hi LineNr guibg=NONE") cmd("hi LineNr guifg=#383c44 guibg=NONE")
cmd("hi Comment guifg=#3d4149")
cmd("hi SignColumn guibg=NONE") cmd("hi SignColumn guibg=NONE")
cmd("hi VertSplit guibg=NONE") cmd("hi VertSplit guibg=NONE guifg=#2a2e36")
cmd("hi DiffAdd guifg=#81A1C1 guibg = none") cmd("hi DiffAdd guifg=#81A1C1 guibg = none")
cmd("hi DiffChange guifg =#3A3E44 guibg = none") cmd("hi DiffChange guifg =#3A3E44 guibg = none")
cmd("hi DiffModified guifg = #81A1C1 guibg = none") cmd("hi DiffModified guifg = #81A1C1 guibg = none")
cmd("hi EndOfBuffer guifg=#282c34") cmd("hi EndOfBuffer guifg=#1e222a")
cmd("hi TelescopeBorder guifg=#3e4451") -- telescope stuff and popupmenu
cmd("hi TelescopePromptBorder guifg=#3e4451") cmd("hi TelescopeBorder guifg=#2a2e36")
cmd("hi TelescopeResultsBorder guifg=#3e4451") cmd("hi TelescopePromptBorder guifg=#2a2e36")
cmd("hi TelescopeResultsBorder guifg=#2a2e36")
cmd("hi TelescopePreviewBorder guifg=#525865") cmd("hi TelescopePreviewBorder guifg=#525865")
cmd("hi PmenuSel guibg=#98c379") cmd("hi PmenuSel guibg=#98c379")
cmd("hi Pmenu guibg=#282c34")
-- tree folder name , icon color -- tree folder name , icon color
cmd("hi NvimTreeFolderIcon guifg = #61afef") cmd("hi NvimTreeFolderIcon guifg = #61afef")
cmd("hi NvimTreeFolderName guifg = #61afef") cmd("hi NvimTreeFolderName guifg = #61afef")
cmd("hi NvimTreeIndentMarker guifg=#545862") cmd("hi NvimTreeIndentMarker guifg=#383c44")
cmd("hi Normal guibg=NONE ctermbg=NONE") cmd("hi Normal guibg=NONE ctermbg=NONE")
@ -73,14 +81,14 @@ require("lspkind").init(
) )
-- nvimTree bg color -- nvimTree bg color
cmd("hi CustomExplorerBg guibg=#242830")
vim.api.nvim_exec( -- hide line numbers in terminal windows
[[ vim.api.nvim_exec([[
augroup NvimTree au BufEnter term://* setlocal nonumber
au! ]], false)
au FileType NvimTree setlocal winhighlight=Normal:CustomExplorerBg
augroup END -- inactive statuslines as thin splitlines
]], cmd("highlight! StatusLineNC gui=underline guibg=NONE guifg=#383c44")
false
) -- smooth scroll
require("neoscroll").setup()

View File

@ -35,7 +35,7 @@ heading "old nvim config will be deleted so watchout :0"
# copying config # copying config
rm -rf ~/.config/nvim/ && mkdir ~/.config/nvim rm -rf ~/.config/nvim/ && mkdir -p ~/.config/nvim
cp -r init.lua ~/.config/nvim && cp -r lua ~/.config/nvim cp -r init.lua ~/.config/nvim && cp -r lua ~/.config/nvim
#for f in `find -E . -regex ".*\.vim$|.*\.lua$"`; do #for f in `find -E . -regex ".*\.vim$|.*\.lua$"`; do
@ -60,15 +60,15 @@ install_node_deps () {
echo "npm not installed" echo "npm not installed"
return return
fi fi
sudo npm install -g $@ sudo npm install -g $@
} }
install_python_deps () { install_python_deps () {
if [[ -z $(which pip) ]]; then if [[ -z $(which pip) && -z $(which pip3) ]]; then
echo "python/pip not installed" echo "python/pip not installed"
return return
fi fi
sudo python3 -m pip install $@ sudo python3 -m pip install $@
} }
install_ts() { install_ts() {

View File

@ -1,6 +1,6 @@
vim.o.termguicolors = true vim.o.termguicolors = true
-- colors for active , inactive buffer tabs -- colors for active , inactive uffer tabs
require "bufferline".setup { require "bufferline".setup {
options = { options = {
buffer_close_icon = "", buffer_close_icon = "",
@ -19,36 +19,40 @@ require "bufferline".setup {
highlights = { highlights = {
background = { background = {
guifg = comment_fg, guifg = comment_fg,
guibg = "#282c34" guibg = "#1e222a"
}, },
fill = { fill = {
guifg = comment_fg, guifg = comment_fg,
guibg = "#282c34" guibg = "#1e222a"
}, },
buffer_selected = { buffer_selected = {
guifg = normal_fg, guifg = normal_fg,
guibg = "#3A3E44", guibg = "#282c34",
gui = "bold" gui = "bold"
}, },
buffer_visible = {
guifg = "#3e4451",
guibg = "#1e222a"
},
separator_visible = { separator_visible = {
guifg = "#282c34", guifg = "#1e222a",
guibg = "#282c34" guibg = "#1e222a"
}, },
separator_selected = { separator_selected = {
guifg = "#282c34", guifg = "#1e222a",
guibg = "#282c34" guibg = "#1e222a"
}, },
separator = { separator = {
guifg = "#282c34", guifg = "#1e222a",
guibg = "#282c34" guibg = "#1e222a"
}, },
indicator_selected = { indicator_selected = {
guifg = "#282c34", guifg = "#1e222a",
guibg = "#282c34" guibg = "#1e222a"
}, },
modified_selected = { modified_selected = {
guifg = string_fg, guifg = string_fg,
guibg = "#3A3E44" guibg = "#353b45"
} }
} }
} }
@ -59,9 +63,11 @@ vim.g.mapleader = " "
--command that adds new buffer and moves to it --command that adds new buffer and moves to it
vim.api.nvim_command "com -nargs=? -complete=file_in_path New badd <args> | blast" vim.api.nvim_command "com -nargs=? -complete=file_in_path New badd <args> | blast"
vim.api.nvim_set_keymap("n","<S-b>",":New ", opt) vim.api.nvim_set_keymap("n", "<S-b>", ":New ", opt)
--removing a buffer --removing a buffer
vim.api.nvim_set_keymap("n","<S-f>",[[<Cmd>bdelete<CR>]], opt) vim.api.nvim_set_keymap("n", "<S-f>", [[<Cmd>bdelete<CR>]], opt)
-- tabnew and tabprev -- tabnew and tabprev
vim.api.nvim_set_keymap("n", "<S-l>", [[<Cmd>BufferLineCycleNext<CR>]], opt) vim.api.nvim_set_keymap("n", "<S-l>", [[<Cmd>BufferLineCycleNext<CR>]], opt)
vim.api.nvim_set_keymap("n", "<S-s>", [[<Cmd>BufferLineCyclePrev<CR>]], opt) vim.api.nvim_set_keymap("n", "<S-s>", [[<Cmd>BufferLineCyclePrev<CR>]], opt)

View File

@ -35,23 +35,24 @@ local t = function(str)
end end
local check_back_space = function() local check_back_space = function()
local col = vim.fn.col('.') - 1 local col = vim.fn.col(".") - 1
if col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') then if col == 0 or vim.fn.getline("."):sub(col, col):match("%s") then
return true return true
else else
return false return false
end end
end end
-- tab completion
_G.tab_complete = function() _G.tab_complete = function()
if vim.fn.pumvisible() == 1 then if vim.fn.pumvisible() == 1 then
return t "<C-n>" return t "<C-n>"
elseif check_back_space() then elseif check_back_space() then
return t "<Tab>" return t "<Tab>"
else else
return vim.fn['compe#complete']() return vim.fn["compe#complete"]()
end end
end end
_G.s_tab_complete = function() _G.s_tab_complete = function()
if vim.fn.pumvisible() == 1 then if vim.fn.pumvisible() == 1 then

45
lua/lspconfig/lua.lua Normal file
View File

@ -0,0 +1,45 @@
vim.cmd [[packadd nvim-lspconfig]]
vim.cmd [[packadd nvim-compe]]
local nvim_lsp = require("lspconfig")
function on_attach(client)
local function buf_set_keymap(...)
vim.api.nvim_buf_set_keymap(bufnr, ...)
end
local function buf_set_option(...)
vim.api.nvim_buf_set_option(bufnr, ...)
end
buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc")
-- Mappings.
local opts = {noremap = true, silent = true}
buf_set_keymap("n", "gD", "<Cmd>lua vim.lsp.buf.declaration()<CR>", opts)
buf_set_keymap("n", "gd", "<Cmd>lua vim.lsp.buf.definition()<CR>", opts)
buf_set_keymap("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>", opts)
buf_set_keymap("n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts)
buf_set_keymap("n", "<C-k>", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts)
buf_set_keymap("n", "<space>wa", "<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>", opts)
buf_set_keymap("n", "<space>wr", "<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>", opts)
buf_set_keymap("n", "<space>wl", "<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>", opts)
buf_set_keymap("n", "<space>D", "<cmd>lua vim.lsp.buf.type_definition()<CR>", opts)
buf_set_keymap("n", "<space>rn", "<cmd>lua vim.lsp.buf.rename()<CR>", opts)
buf_set_keymap("n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>", opts)
buf_set_keymap("n", "<space>e", "<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>", opts)
buf_set_keymap("n", "[d", "<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>", opts)
buf_set_keymap("n", "]d", "<cmd>lua vim.lsp.diagnostic.goto_next()<CR>", opts)
buf_set_keymap("n", "<space>q", "<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>", opts)
-- Set some keybinds conditional on server capabilities
if client.resolved_capabilities.document_formatting then
buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
elseif client.resolved_capabilities.document_range_formatting then
buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.range_formatting()<CR>", opts)
end
end
local servers = {"tsserver", "cssls", "html" , "pyls"}
for _, lsp in ipairs(servers) do
nvim_lsp[lsp].setup {on_attach = on_attach}
end

View File

@ -6,9 +6,12 @@ local function map(mode, lhs, rhs, opts)
vim.api.nvim_set_keymap(mode, lhs, rhs, options) vim.api.nvim_set_keymap(mode, lhs, rhs, options)
end end
-- keybind list -- copy any selected text with pressing y
map("", "<leader>c", '"+y') map("", "<leader>c", '"+y')
-- open terminals -- OPEN TERMINALS --
map("n", "<C-b>" , [[<Cmd> vnew term://bash<CR>]] , opt) -- split term vertically , over the right map("n", "<C-l>", [[<Cmd>vnew term://bash <CR>]], opt) -- open term over right
map("n", "<C-x>" , [[<Cmd> split term://bash | resize 10 <CR>]] , opt) -- split term vertically , over the right map("n", "<C-x>", [[<Cmd> split term://bash | resize 10 <CR>]], opt) -- open term bottom
-- COPY EVERYTHING --
map("n", "<C-a>", [[ <Cmd> %y+<CR>]], opt)

View File

@ -1,42 +0,0 @@
vim.cmd [[packadd nvim-lspconfig]]
vim.cmd [[packadd nvim-compe]]
local nvim_lsp = require('lspconfig')
function on_attach(client)
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
-- Mappings.
local opts = { noremap=true, silent=true }
buf_set_keymap('n', 'gD', '<Cmd>lua vim.lsp.buf.declaration()<CR>', opts)
buf_set_keymap('n', 'gd', '<Cmd>lua vim.lsp.buf.definition()<CR>', opts)
buf_set_keymap('n', 'K', '<Cmd>lua vim.lsp.buf.hover()<CR>', opts)
buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
buf_set_keymap('n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
buf_set_keymap('n', '<space>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
buf_set_keymap('n', '<space>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
buf_set_keymap('n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
buf_set_keymap('n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
buf_set_keymap('n', '<space>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
buf_set_keymap('n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
buf_set_keymap('n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
buf_set_keymap('n', '<space>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
-- Set some keybinds conditional on server capabilities
if client.resolved_capabilities.document_formatting then
buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
elseif client.resolved_capabilities.document_range_formatting then
buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.range_formatting()<CR>", opts)
end
end
local servers = { "tsserver", "cssls", "pyls", "html" }
for _, lsp in ipairs(servers) do
nvim_lsp[lsp].setup { on_attach = on_attach }
end

View File

@ -2,27 +2,29 @@ vim.cmd [[packadd nvim-tree.lua]]
vim.o.termguicolors = true vim.o.termguicolors = true
vim.g.nvim_tree_side = "left" local g = vim.g
vim.g.nvim_tree_width = 25
vim.g.nvim_tree_ignore = {".git", "node_modules", ".cache"}
vim.g.nvim_tree_auto_open = 0
vim.g.nvim_tree_auto_close = 0
vim.g.nvim_tree_quit_on_open = 0
vim.g.nvim_tree_follow = 1
vim.g.nvim_tree_indent_markers = 1
vim.g.nvim_tree_hide_dotfiles = 1
vim.g.nvim_tree_git_hl = 1
vim.g.nvim_tree_root_folder_modifier = ":~"
vim.g.nvim_tree_tab_open = 1
vim.g.nvim_tree_allow_resize = 1
vim.g.nvim_tree_show_icons = { g.nvim_tree_side = "left"
g.nvim_tree_width = 25
g.nvim_tree_ignore = {".git", "node_modules", ".cache"}
g.nvim_tree_auto_open = 0
g.nvim_tree_auto_close = 0
g.nvim_tree_quit_on_open = 0
g.nvim_tree_follow = 1
g.nvim_tree_indent_markers = 1
g.nvim_tree_hide_dotfiles = 1
g.nvim_tree_git_hl = 1
g.nvim_tree_root_folder_modifier = ":~"
g.nvim_tree_tab_open = 1
g.nvim_tree_allow_resize = 1
g.nvim_tree_show_icons = {
git = 1, git = 1,
folders = 1, folders = 1,
files = 1 files = 1
} }
vim.g.nvim_tree_icons = { g.nvim_tree_icons = {
default = "", default = "",
symlink = "", symlink = "",
git = { git = {
@ -55,7 +57,7 @@ vim.api.nvim_set_keymap(
} }
) )
vim.g.nvim_tree_bindings = { g.nvim_tree_bindings = {
["<CR>"] = get_lua_cb("edit"), ["<CR>"] = get_lua_cb("edit"),
["o"] = get_lua_cb("edit"), ["o"] = get_lua_cb("edit"),
["<2-LeftMouse>"] = get_lua_cb("edit"), ["<2-LeftMouse>"] = get_lua_cb("edit"),

View File

@ -1,20 +1,21 @@
-- check if packer is installed (~/local/share/nvim/site/pack) -- check if packer is installed (~/local/share/nvim/site/pack)
local packer_exists = pcall(vim.cmd, [[packadd packer.nvim]]) local packer_exists = pcall(vim.cmd, [[packadd packer.nvim]])
-- using { } when using a different branch of the plugin or loading the plugin with certain commands
return require("packer").startup( return require("packer").startup(
function() function()
use {"wbthomason/packer.nvim", opt = true} use {"wbthomason/packer.nvim", opt = true}
use {"lukas-reineke/indent-blankline.nvim", branch = "lua"} use {"lukas-reineke/indent-blankline.nvim", branch = "lua"}
use "norcalli/nvim-base16.lua"
use "kyazdani42/nvim-web-devicons" use "kyazdani42/nvim-web-devicons"
use "kyazdani42/nvim-tree.lua" use "kyazdani42/nvim-tree.lua"
use "nvim-lua/plenary.nvim" use "nvim-lua/plenary.nvim"
use "lewis6991/gitsigns.nvim" use "lewis6991/gitsigns.nvim"
use "glepnir/galaxyline.nvim"
use "akinsho/nvim-bufferline.lua" use "akinsho/nvim-bufferline.lua"
use "glepnir/galaxyline.nvim"
use "907th/vim-auto-save" use "907th/vim-auto-save"
use "nvim-treesitter/nvim-treesitter" use "nvim-treesitter/nvim-treesitter"
use "chriskempson/base16-vim"
use "norcalli/nvim-colorizer.lua" use "norcalli/nvim-colorizer.lua"
use "ryanoasis/vim-devicons" use "ryanoasis/vim-devicons"
use "sbdchd/neoformat" use "sbdchd/neoformat"
@ -28,5 +29,8 @@ return require("packer").startup(
use "nvim-telescope/telescope-media-files.nvim" use "nvim-telescope/telescope-media-files.nvim"
use "nvim-lua/popup.nvim" use "nvim-lua/popup.nvim"
use "karb94/neoscroll.nvim" use "karb94/neoscroll.nvim"
use "nekonako/xresources-nvim"
end end
) )

View File

@ -1,10 +1,11 @@
local gl = require("galaxyline") local gl = require("galaxyline")
local gls = gl.section local gls = gl.section
gl.short_line_list = {" "}
gl.short_line_list = {" "} -- keeping this table { } as empty will show inactive statuslines
local colors = { local colors = {
bg = "#282c34", bg = "#1e222a",
line_bg = "#282c34", line_bg = "#1e222a",
fg = "#D8DEE9", fg = "#D8DEE9",
fg_green = "#65a380", fg_green = "#65a380",
yellow = "#A3BE8C", yellow = "#A3BE8C",
@ -16,7 +17,7 @@ local colors = {
magenta = "#c678dd", magenta = "#c678dd",
blue = "#22262C", blue = "#22262C",
red = "#DF8890", red = "#DF8890",
lightbg = "#3C4048", lightbg = "#282c34",
nord = "#81A1C1", nord = "#81A1C1",
greenYel = "#EBCB8B" greenYel = "#EBCB8B"
} }
@ -31,7 +32,7 @@ gls.left[1] = {
} }
gls.left[2] = { gls.left[2] = {
ViMode = { statusIcon = {
provider = function() provider = function()
return "" return ""
end, end,
@ -168,7 +169,7 @@ gls.right[3] = {
} }
gls.right[4] = { gls.right[4] = {
SiMode = { ViMode = {
provider = function() provider = function()
local alias = { local alias = {
n = "NORMAL", n = "NORMAL",

View File

@ -60,7 +60,7 @@ local opt = {noremap = true, silent = true}
vim.g.mapleader = " " vim.g.mapleader = " "
-- mappings -- mappings
vim.api.nvim_set_keymap("n", "<Leader>ff", [[<Cmd>lua require('telescope.builtin').find_files()<CR>]], opt) vim.api.nvim_set_keymap("n", "<Leader>ff", [[<Cmd>lua require('telescope.builtin').find_files()<CR>]], opt)
vim.api.nvim_set_keymap( vim.api.nvim_set_keymap(
"n", "n",
@ -68,9 +68,8 @@ vim.api.nvim_set_keymap(
[[<Cmd>lua require('telescope').extensions.media_files.media_files()<CR>]], [[<Cmd>lua require('telescope').extensions.media_files.media_files()<CR>]],
opt opt
) )
vim.api.nvim_set_keymap("n", "<Leader>fb", [[<Cmd>lua require('telescope.builtin').buffers()<CR>]], opt) vim.api.nvim_set_keymap("n", "<Leader>fb", [[<Cmd>lua require('telescope.builtin').buffers()<CR>]], opt)
vim.api.nvim_set_keymap("n", "<Leader>fh", [[<Cmd>lua require('telescope.builtin').help_tags()<CR>]], opt) vim.api.nvim_set_keymap("n", "<Leader>fh", [[<Cmd>lua require('telescope.builtin').help_tags()<CR>]], opt)
vim.api.nvim_set_keymap("n", "<Leader>fo", [[<Cmd>lua require('telescope.builtin').oldfiles()<CR>]], opt) vim.api.nvim_set_keymap("n", "<Leader>fo", [[<Cmd>lua require('telescope.builtin').oldfiles()<CR>]], opt)
vim.api.nvim_set_keymap("n", "<Leader>fm", [[<Cmd> Neoformat<CR>]], opt) vim.api.nvim_set_keymap("n", "<Leader>fm", [[<Cmd> Neoformat<CR>]], opt)
vim.api.nvim_set_keymap("n", "<C-a>", [[ <Cmd> %y+<CR>]], opt)

View File

@ -1,141 +0,0 @@
" Automatically generated packer.nvim plugin loader code
if !has('nvim-0.5')
echohl WarningMsg
echom "Invalid Neovim version for packer.nvim!"
echohl None
finish
endif
packadd packer.nvim
try
lua << END
local package_path_str = "/home/sid/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/sid/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/sid/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/sid/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
local install_cpath_pattern = "/home/sid/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so"
if not string.find(package.path, package_path_str, 1, true) then
package.path = package.path .. ';' .. package_path_str
end
if not string.find(package.cpath, install_cpath_pattern, 1, true) then
package.cpath = package.cpath .. ';' .. install_cpath_pattern
end
local function try_loadstring(s, component, name)
local success, result = pcall(loadstring(s))
if not success then
print('Error running ' .. component .. ' for ' .. name)
error(result)
end
return result
end
_G.packer_plugins = {
["base16-vim"] = {
loaded = true,
path = "/home/sid/.local/share/nvim/site/pack/packer/start/base16-vim"
},
["galaxyline.nvim"] = {
loaded = true,
path = "/home/sid/.local/share/nvim/site/pack/packer/start/galaxyline.nvim"
},
["gitsigns.nvim"] = {
loaded = true,
path = "/home/sid/.local/share/nvim/site/pack/packer/start/gitsigns.nvim"
},
["indent-blankline.nvim"] = {
loaded = true,
path = "/home/sid/.local/share/nvim/site/pack/packer/start/indent-blankline.nvim"
},
indentLine = {
loaded = true,
path = "/home/sid/.local/share/nvim/site/pack/packer/start/indentLine"
},
["lspkind-nvim"] = {
loaded = true,
path = "/home/sid/.local/share/nvim/site/pack/packer/start/lspkind-nvim"
},
neoformat = {
loaded = true,
path = "/home/sid/.local/share/nvim/site/pack/packer/start/neoformat"
},
["nvim-autopairs"] = {
loaded = true,
path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-autopairs"
},
["nvim-bufferline.lua"] = {
loaded = true,
path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-bufferline.lua"
},
["nvim-colorizer.lua"] = {
loaded = true,
path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-colorizer.lua"
},
["nvim-compe"] = {
loaded = true,
path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-compe"
},
["nvim-lspconfig"] = {
loaded = true,
path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-lspconfig"
},
["nvim-tree.lua"] = {
loaded = true,
path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-tree.lua"
},
["nvim-treesitter"] = {
loaded = true,
path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-treesitter"
},
["nvim-web-devicons"] = {
loaded = true,
path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-web-devicons"
},
["packer.nvim"] = {
loaded = false,
needs_bufread = false,
path = "/home/sid/.local/share/nvim/site/pack/packer/opt/packer.nvim"
},
["plenary.nvim"] = {
loaded = true,
path = "/home/sid/.local/share/nvim/site/pack/packer/start/plenary.nvim"
},
["popup.nvim"] = {
loaded = true,
path = "/home/sid/.local/share/nvim/site/pack/packer/start/popup.nvim"
},
["startuptime.vim"] = {
loaded = true,
path = "/home/sid/.local/share/nvim/site/pack/packer/start/startuptime.vim"
},
["telescope-media-files.nvim"] = {
loaded = true,
path = "/home/sid/.local/share/nvim/site/pack/packer/start/telescope-media-files.nvim"
},
["telescope.nvim"] = {
loaded = true,
path = "/home/sid/.local/share/nvim/site/pack/packer/start/telescope.nvim"
},
["vim-auto-save"] = {
loaded = true,
path = "/home/sid/.local/share/nvim/site/pack/packer/start/vim-auto-save"
},
["vim-closetag"] = {
loaded = true,
path = "/home/sid/.local/share/nvim/site/pack/packer/start/vim-closetag"
},
["vim-devicons"] = {
loaded = true,
path = "/home/sid/.local/share/nvim/site/pack/packer/start/vim-devicons"
}
}
END
catch
echohl ErrorMsg
echom "Error in packer_compiled: " .. v:exception
echom "Please check your config for correctness"
echohl None
endtry