-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from xshin404/main
Main Branch myTermux-v.0.4.4 dev
- Loading branch information
Showing
35 changed files
with
1,441 additions
and
3,424 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
-- load all plugins | ||
require "pluginsList.lua" | ||
require "file-icons.lua" | ||
|
||
require "misc-utils.lua" | ||
require "bufferline.lua" | ||
require "statusline.lua" | ||
|
||
require("colorizer").setup() | ||
require("neoscroll").setup() -- smooth scroll | ||
|
||
-- lsp | ||
require "lspconfig.lua" | ||
require "compe.lua" | ||
|
||
local cmd = vim.cmd | ||
local g = vim.g | ||
|
||
local colors = { | ||
|
||
bg = "#1e222a", | ||
line_bg = "#1e222a", | ||
fg = "#D8DEE9", | ||
fg_green = "#65a380", | ||
yellow = "#A3BE8C", | ||
cyan = "#22262C", | ||
darkblue = "#61afef", | ||
green = "#BBE67E", | ||
orange = "#FF8800", | ||
purple = "#252930", | ||
magenta = "#c678dd", | ||
blue = "#22262C", | ||
-- red = "#DF8890", | ||
-- red = "#FA5AA4", | ||
red = "#FA74B2", | ||
lightbg = "#282c34", | ||
nord = "#81A1C1", | ||
greenYel = "#EBCB8B" | ||
|
||
} | ||
|
||
g.mapleader = " " | ||
g.auto_save = 1 | ||
|
||
-- colorscheme related stuff | ||
|
||
cmd "syntax enable" | ||
cmd "syntax on" | ||
|
||
local base16 = require "base16" | ||
base16(base16.themes["onedark"], true) | ||
|
||
-- blankline | ||
|
||
local indent = 2 | ||
|
||
g.indentLine_enabled = 1 | ||
g.indent_blankline_char = "▏" | ||
|
||
cmd "hi IndentBlanklineChar guifg=#2a2e36" | ||
|
||
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_first_indent_level = false | ||
|
||
--require "treesitter.lua" | ||
require "mappings.lua" | ||
require "settings.lua" | ||
|
||
-- highlights -- | ||
cmd "hi LineNr guifg=#42464e guibg=NONE" | ||
cmd "hi Comment guifg=#42464e" | ||
|
||
cmd "hi SignColumn guibg=NONE" | ||
cmd "hi VertSplit guibg=NONE guifg=#2a2e36" | ||
cmd "hi EndOfBuffer guifg=#1e222a" | ||
cmd "hi PmenuSel guibg=#98c379" | ||
cmd "hi Pmenu guibg=#282c34" | ||
|
||
cmd "hi Normal guibg=NONE ctermbg=NONE" | ||
|
||
require "telescope.lua" | ||
require "nvimTree.lua" | ||
|
||
-- git signs | ||
require "gitsigns.lua" | ||
|
||
require("nvim-autopairs").setup() | ||
|
||
require("lspkind").init( | ||
{ | ||
with_text = true, | ||
symbol_map = { | ||
Folder = "" | ||
} | ||
} | ||
) | ||
|
||
-- hide line numbers in terminal windows | ||
vim.api.nvim_exec([[ | ||
au BufEnter term://* setlocal nonumber | ||
]], false) | ||
|
||
-- inactive statuslines as thin splitlines | ||
cmd("highlight! StatusLineNC gui=underline guibg=NONE guifg=#D8DEE9") | ||
|
||
cmd "hi clear CursorLine" | ||
cmd "hi cursorlinenr guibg=NONE guifg=#D8DEE9" | ||
|
||
-- setup for TrueZen.nvim | ||
require "zenmode.lua" | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
vim.o.termguicolors = true | ||
|
||
-- colors for active , inactive uffer tabs | ||
require "bufferline".setup { | ||
options = { | ||
buffer_close_icon = "", | ||
modified_icon = "●", | ||
close_icon = "", | ||
left_trunc_marker = "", | ||
right_trunc_marker = "", | ||
max_name_length = 14, | ||
max_prefix_length = 13, | ||
tab_size = 18, | ||
enforce_regular_tabs = true, | ||
view = "multiwindow", | ||
show_buffer_close_icons = true, | ||
separator_style = "thin" | ||
}, | ||
highlights = { | ||
background = { | ||
guifg = comment_fg, | ||
guibg = "#1e222a" | ||
}, | ||
fill = { | ||
guifg = comment_fg, | ||
guibg = "#1e222a" | ||
}, | ||
buffer_selected = { | ||
guifg = normal_fg, | ||
guibg = "#282c34", | ||
gui = "bold" | ||
}, | ||
buffer_visible = { | ||
guifg = "#3e4451", | ||
guibg = "#1e222a" | ||
}, | ||
separator_visible = { | ||
guifg = "#1e222a", | ||
guibg = "#1e222a" | ||
}, | ||
separator_selected = { | ||
guifg = "#1e222a", | ||
guibg = "#1e222a" | ||
}, | ||
separator = { | ||
guifg = "#1e222a", | ||
guibg = "#1e222a" | ||
}, | ||
indicator_selected = { | ||
guifg = "#1e222a", | ||
guibg = "#1e222a" | ||
}, | ||
modified_selected = { | ||
guifg = string_fg, | ||
guibg = "#353b45" | ||
} | ||
} | ||
} | ||
|
||
local opt = {silent = true} | ||
|
||
vim.g.mapleader = " " | ||
|
||
--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_set_keymap("n", "<S-b>", ":New ", opt) | ||
|
||
--removing a buffer | ||
vim.api.nvim_set_keymap("n", "<S-f>", [[<Cmd>bdelete<CR>]], opt) | ||
|
||
-- tabnew and tabprev | ||
vim.api.nvim_set_keymap("n", "<S-l>", [[<Cmd>BufferLineCycleNext<CR>]], opt) | ||
vim.api.nvim_set_keymap("n", "<S-s>", [[<Cmd>BufferLineCyclePrev<CR>]], opt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
vim.cmd [[packadd nvim-lspconfig]] | ||
vim.cmd [[packadd nvim-compe]] | ||
|
||
vim.o.completeopt = "menuone,noselect" | ||
|
||
require "compe".setup { | ||
enabled = true, | ||
autocomplete = true, | ||
debug = false, | ||
min_length = 1, | ||
preselect = "enable", | ||
throttle_time = 80, | ||
source_timeout = 200, | ||
incomplete_delay = 400, | ||
max_abbr_width = 100, | ||
max_kind_width = 100, | ||
max_menu_width = 100, | ||
documentation = true, | ||
source = { | ||
path = true, | ||
buffer = true, | ||
calc = true, | ||
vsnip = true, | ||
nvim_lsp = true, | ||
nvim_lua = true, | ||
spell = true, | ||
tags = true, | ||
snippets_nvim = true, | ||
treesitter = true | ||
} | ||
} | ||
|
||
local t = function(str) | ||
return vim.api.nvim_replace_termcodes(str, true, true, true) | ||
end | ||
|
||
local check_back_space = function() | ||
local col = vim.fn.col(".") - 1 | ||
if col == 0 or vim.fn.getline("."):sub(col, col):match("%s") then | ||
return true | ||
else | ||
return false | ||
end | ||
end | ||
|
||
-- tab completion | ||
|
||
_G.tab_complete = function() | ||
if vim.fn.pumvisible() == 1 then | ||
return t "<C-n>" | ||
elseif check_back_space() then | ||
return t "<Tab>" | ||
else | ||
return vim.fn["compe#complete"]() | ||
end | ||
end | ||
_G.s_tab_complete = function() | ||
if vim.fn.pumvisible() == 1 then | ||
return t "<C-p>" | ||
elseif vim.fn.call("vsnip#jumpable", {-1}) == 1 then | ||
return t "<Plug>(vsnip-jump-prev)" | ||
else | ||
return t "<S-Tab>" | ||
end | ||
end | ||
|
||
-- mappings | ||
|
||
vim.api.nvim_set_keymap("i", "<Tab>", "v:lua.tab_complete()", {expr = true}) | ||
vim.api.nvim_set_keymap("s", "<Tab>", "v:lua.tab_complete()", {expr = true}) | ||
vim.api.nvim_set_keymap("i", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true}) | ||
vim.api.nvim_set_keymap("s", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true}) | ||
|
||
function _G.completions() | ||
local npairs = require("nvim-autopairs") | ||
if vim.fn.pumvisible() == 1 then | ||
if vim.fn.complete_info()["selected"] ~= -1 then | ||
return vim.fn["compe#confirm"]("<CR>") | ||
end | ||
end | ||
return npairs.check_break_line_char() | ||
end | ||
|
||
vim.api.nvim_set_keymap("i", "<CR>", "v:lua.completions()", {expr = true}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
vim.cmd [[packadd nvim-web-devicons]] | ||
|
||
require "nvim-web-devicons".setup { | ||
override = { | ||
html = { | ||
icon = "", | ||
color = "#DE8C92", | ||
name = "html" | ||
}, | ||
css = { | ||
icon = "", | ||
color = "#61afef", | ||
name = "css" | ||
}, | ||
js = { | ||
icon = "", | ||
color = "#EBCB8B", | ||
name = "js" | ||
}, | ||
ts = { | ||
icon = "ﯤ", | ||
color = "#519ABA", | ||
name = "ts" | ||
}, | ||
kt = { | ||
icon = "", | ||
color = "#ffcb91", | ||
name = "kt" | ||
}, | ||
png = { | ||
icon = " ", | ||
color = "#BD77DC", | ||
name = "png" | ||
}, | ||
jpg = { | ||
icon = " ", | ||
color = "#BD77DC", | ||
name = "jpg" | ||
}, | ||
jpeg = { | ||
icon = " ", | ||
color = "#BD77DC", | ||
name = "jpeg" | ||
}, | ||
mp3 = { | ||
icon = "", | ||
color = "#C8CCD4", | ||
name = "mp3" | ||
}, | ||
mp4 = { | ||
icon = "", | ||
color = "#C8CCD4", | ||
name = "mp4" | ||
}, | ||
out = { | ||
icon = "", | ||
color = "#C8CCD4", | ||
name = "out" | ||
}, | ||
Dockerfile = { | ||
icon = "", | ||
color = "#b8b5ff", | ||
name = "Dockerfile" | ||
}, | ||
rb = { | ||
icon = "", | ||
color = "#ff75a0", | ||
name = "rb" | ||
}, | ||
vue = { | ||
icon = "﵂", | ||
color = "#7eca9c", | ||
name = "vue" | ||
}, | ||
py = { | ||
icon = "", | ||
color = "#a7c5eb", | ||
name = "py" | ||
}, | ||
toml = { | ||
icon = "", | ||
color = "#61afef", | ||
name = "toml" | ||
}, | ||
lock = { | ||
icon = "", | ||
color = "#DE6B74", | ||
name = "lock" | ||
}, | ||
zip = { | ||
icon = "", | ||
color = "#EBCB8B", | ||
name = "zip" | ||
}, | ||
xz = { | ||
icon = "", | ||
color = "#EBCB8B", | ||
name = "xz" | ||
} | ||
} | ||
} |
Oops, something went wrong.