moved to lua
This commit is contained in:
parent
e156ec2615
commit
bfb2c3e59d
25
basic.vim
25
basic.vim
|
|
@ -1,25 +0,0 @@
|
|||
set number relativenumber
|
||||
set clipboard=unnamedplus
|
||||
set mouse=a
|
||||
|
||||
set t_Co=16
|
||||
set termguicolors
|
||||
|
||||
filetype plugin indent on
|
||||
" show existing tab with 4 spaces width
|
||||
set tabstop=2
|
||||
" when indenting with '>', use 4 spaces width
|
||||
set shiftwidth=2
|
||||
" On pressing tab, insert 4 spaces
|
||||
set expandtab
|
||||
" Spellcheck
|
||||
autocmd FileType markdown setlocal spell spelllang=de,en
|
||||
|
||||
set splitright
|
||||
set splitbelow
|
||||
|
||||
" allow two signs to show up in the sign collumn eg. todo comment and git status
|
||||
set signcolumn=auto:2
|
||||
|
||||
" set leader key
|
||||
let mapleader = ","
|
||||
5
init.vim
5
init.vim
|
|
@ -1,5 +0,0 @@
|
|||
source ~/.config/nvim/basic.vim
|
||||
source ~/.config/nvim/plugins.vim
|
||||
|
||||
autocmd bufnewfile,bufread *.tsx set filetype=typescriptreact
|
||||
autocmd bufnewfile,bufread *.jsx set filetype=javascriptreact
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
local set = vim.o
|
||||
|
||||
set.number = true
|
||||
set.relativenumber = true
|
||||
set.clipboard = "unnamedplus"
|
||||
set.mouse = "a"
|
||||
set.termguicolors = true
|
||||
|
||||
vim.cmd [[filetype plugin indent on]]
|
||||
set.tabstop = 2
|
||||
set.shiftwidth = 2
|
||||
set.expandtab = true
|
||||
|
||||
vim.cmd [[autocmd FileType markdown setlocal spell spelllang=de,en]]
|
||||
vim.cmd [[autocmd bufnewfile,bufread *.tsx set filetype=typescriptreact]]
|
||||
vim.cmd [[autocmd bufnewfile,bufread *.jsx set filetype=javascriptreact]]
|
||||
|
||||
set.splitright = true
|
||||
set.splitbelow = true
|
||||
|
||||
set.signcolumn = "auto:2"
|
||||
|
||||
-- set leader
|
||||
vim.g.mapleader = ","
|
||||
|
|
@ -0,0 +1 @@
|
|||
vim.api.nvim_set_keymap("n", "<leader>f", "<CMD>Telescope find_files<CR>", {silent = true})
|
||||
|
|
@ -0,0 +1,135 @@
|
|||
local vim = vim
|
||||
local execute = vim.api.nvim_command
|
||||
local fn = vim.fn
|
||||
-- ensure that packer is installed
|
||||
local install_path = fn.stdpath("data") .. "/site/pack/packer/opt/packer.nvim"
|
||||
if fn.empty(fn.glob(install_path)) > 0 then
|
||||
execute("!git clone https://github.com/wbthomason/packer.nvim " .. install_path)
|
||||
execute "packadd packer.nvim"
|
||||
end
|
||||
vim.cmd("packadd packer.nvim")
|
||||
local packer = require "packer"
|
||||
local util = require "packer.util"
|
||||
|
||||
packer.init(
|
||||
{
|
||||
package_root = util.join_paths(vim.fn.stdpath("data"), "site", "pack")
|
||||
}
|
||||
)
|
||||
|
||||
return require("packer").startup(
|
||||
function()
|
||||
-- Packer can manage itself
|
||||
use "wbthomason/packer.nvim"
|
||||
use "MasterGordon/monokai.nvim"
|
||||
use {
|
||||
"glepnir/galaxyline.nvim",
|
||||
branch = "main",
|
||||
config = function()
|
||||
require "plugins/galaxyline"
|
||||
end,
|
||||
requires = {"kyazdani42/nvim-web-devicons"}
|
||||
}
|
||||
use {
|
||||
"kyazdani42/nvim-tree.lua",
|
||||
config = function()
|
||||
require "plugins/nvim-tree"
|
||||
end,
|
||||
requires = {"kyazdani42/nvim-web-devicons", opt = true}
|
||||
}
|
||||
use "JoosepAlviste/nvim-ts-context-commentstring"
|
||||
use {
|
||||
"b3nj5m1n/kommentary",
|
||||
config = function()
|
||||
require("kommentary.config").configure_language(
|
||||
"typescriptreact",
|
||||
{
|
||||
single_line_comment_string = "auto",
|
||||
multi_line_comment_strings = "auto",
|
||||
hook_function = function()
|
||||
require("ts_context_commentstring.internal").update_commentstring()
|
||||
end
|
||||
}
|
||||
)
|
||||
end
|
||||
}
|
||||
use {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
run = ":TSUpdate",
|
||||
config = function()
|
||||
require("nvim-autopairs").setup(
|
||||
{
|
||||
enable_check_bracket_line = true
|
||||
}
|
||||
)
|
||||
require "nvim-treesitter.configs".setup {
|
||||
context_commentstring = {
|
||||
enable = true,
|
||||
enable_autocmd = true
|
||||
},
|
||||
highlight = {
|
||||
enable = true
|
||||
},
|
||||
indent = {
|
||||
enable = true
|
||||
},
|
||||
autotag = {
|
||||
enable = true
|
||||
}
|
||||
}
|
||||
end,
|
||||
requires = {"JoosepAlviste/nvim-ts-context-commentstring", "windwp/nvim-ts-autotag", "windwp/nvim-autopairs"}
|
||||
}
|
||||
use {
|
||||
"mhartington/formatter.nvim",
|
||||
config = function()
|
||||
require "plugins/formatter"
|
||||
end
|
||||
}
|
||||
use {
|
||||
"mhinz/vim-signify",
|
||||
config = function()
|
||||
require "plugins/signify"
|
||||
end
|
||||
}
|
||||
use {
|
||||
"RishabhRD/nvim-lsputils",
|
||||
requires = {"RishabhRD/popfix"}
|
||||
}
|
||||
use {
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
require "plugins/lsp"
|
||||
end,
|
||||
requires = {"RishabhRD/nvim-lsputils", "onsails/lspkind-nvim"}
|
||||
}
|
||||
use {
|
||||
"hrsh7th/nvim-compe",
|
||||
config = function()
|
||||
require "plugins/compe"
|
||||
end
|
||||
}
|
||||
use {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
requires = {{"nvim-lua/popup.nvim"}, {"nvim-lua/plenary.nvim"}}
|
||||
}
|
||||
use {
|
||||
"nacro90/numb.nvim",
|
||||
config = function()
|
||||
require("numb").setup()
|
||||
end
|
||||
}
|
||||
use {
|
||||
"norcalli/nvim-colorizer.lua",
|
||||
config = function()
|
||||
require "colorizer".setup()
|
||||
end
|
||||
}
|
||||
use {
|
||||
"tveskag/nvim-blame-line",
|
||||
config = function()
|
||||
vim.api.nvim_exec([[autocmd BufEnter * EnableBlameLine]], true)
|
||||
end
|
||||
}
|
||||
end
|
||||
)
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
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,
|
||||
nvim_lsp = true,
|
||||
nvim_lua = true,
|
||||
vsnip = false
|
||||
}
|
||||
}
|
||||
|
||||
vim.api.nvim_set_keymap("i", "<C-Space>", "compe#complete()", {silent = true, expr = true})
|
||||
vim.api.nvim_set_keymap("i", "<CR>", "compe#confirm('<CR>')", {silent = true, expr = true})
|
||||
vim.api.nvim_set_keymap("i", "<C-e>", "compe#close('<C-e>')", {silent = true, expr = true})
|
||||
vim.api.nvim_set_keymap("i", "<C-f>", "compe#scroll({ 'delta': +4 })", {silent = true, expr = true})
|
||||
vim.api.nvim_set_keymap("i", "<C-d>", "compe#scroll({ 'delta': -4 })", {silent = true, expr = true})
|
||||
|
|
@ -0,0 +1,231 @@
|
|||
local gl = require("galaxyline")
|
||||
local colors = require("galaxyline.theme").default
|
||||
local monokai = require("monokai")
|
||||
local condition = require("galaxyline.condition")
|
||||
local gls = gl.section
|
||||
colors.bg = monokai.bg
|
||||
gl.short_line_list = {"NvimTree", "vista", "dbui", "packer"}
|
||||
|
||||
gls.left[2] = {
|
||||
ViMode = {
|
||||
provider = function()
|
||||
-- auto change color according the vim mode
|
||||
local mode_color = {
|
||||
n = colors.green,
|
||||
i = colors.red,
|
||||
v = colors.blue,
|
||||
[""] = colors.blue,
|
||||
V = colors.blue,
|
||||
c = colors.magenta,
|
||||
no = colors.red,
|
||||
s = colors.orange,
|
||||
S = colors.orange,
|
||||
[""] = colors.orange,
|
||||
ic = colors.yellow,
|
||||
R = colors.violet,
|
||||
Rv = colors.violet,
|
||||
cv = colors.red,
|
||||
ce = colors.red,
|
||||
r = colors.cyan,
|
||||
rm = colors.cyan,
|
||||
["r?"] = colors.cyan,
|
||||
["!"] = colors.red,
|
||||
t = colors.red
|
||||
}
|
||||
local mode_map = {
|
||||
["n"] = "NORMAL ",
|
||||
["no"] = "N·OPERATOR PENDING ",
|
||||
["v"] = "VISUAL ",
|
||||
["V"] = "V·LINE ",
|
||||
[""] = "V·BLOCK ",
|
||||
["s"] = "SELECT ",
|
||||
["S"] = "S·LINE ",
|
||||
[""] = "S·BLOCK ",
|
||||
["i"] = "INSERT ",
|
||||
["R"] = "REPLACE ",
|
||||
["Rv"] = "V·REPLACE ",
|
||||
["c"] = "COMMAND ",
|
||||
["cv"] = "VIM EX ",
|
||||
["ce"] = "EX ",
|
||||
["r"] = "PROMPT ",
|
||||
["rm"] = "MORE ",
|
||||
["r?"] = "CONFIRM ",
|
||||
["!"] = "SHELL ",
|
||||
["t"] = "TERMINAL "
|
||||
}
|
||||
vim.api.nvim_command("hi GalaxyViMode guibg=" .. mode_color[vim.fn.mode()])
|
||||
return " " .. mode_map[vim.fn.mode()]
|
||||
end,
|
||||
separator = " ",
|
||||
separator_highlight = {nil, colors.bg},
|
||||
highlight = {colors.bg, colors.bg, "bold"}
|
||||
}
|
||||
}
|
||||
gls.left[3] = {
|
||||
Macro = {
|
||||
provider = function()
|
||||
local reg = vim.fn.reg_recording()
|
||||
|
||||
if (reg == nil) or (reg == "") then
|
||||
return ""
|
||||
else
|
||||
return " " .. vim.call("reg_recording") .. " "
|
||||
end
|
||||
end,
|
||||
highlight = {colors.red, colors.bg}
|
||||
}
|
||||
}
|
||||
gls.left[5] = {
|
||||
FileIcon = {
|
||||
provider = "FileIcon",
|
||||
condition = condition.buffer_not_empty,
|
||||
highlight = {require("galaxyline.provider_fileinfo").get_file_icon_color, colors.bg}
|
||||
}
|
||||
}
|
||||
|
||||
gls.left[6] = {
|
||||
FileName = {
|
||||
provider = "FileName",
|
||||
condition = condition.buffer_not_empty,
|
||||
highlight = {colors.magenta, colors.bg, "bold"}
|
||||
}
|
||||
}
|
||||
|
||||
gls.left[7] = {
|
||||
LineInfo = {
|
||||
provider = "LineColumn",
|
||||
separator = " ",
|
||||
separator_highlight = {"NONE", colors.bg},
|
||||
highlight = {colors.fg, colors.bg}
|
||||
}
|
||||
}
|
||||
|
||||
gls.left[8] = {
|
||||
PerCent = {
|
||||
provider = "LinePercent",
|
||||
separator = " ",
|
||||
separator_highlight = {"NONE", colors.bg},
|
||||
highlight = {colors.fg, colors.bg, "bold"}
|
||||
}
|
||||
}
|
||||
|
||||
gls.left[9] = {
|
||||
DiagnosticError = {
|
||||
provider = "DiagnosticError",
|
||||
icon = " ",
|
||||
highlight = {colors.red, colors.bg}
|
||||
}
|
||||
}
|
||||
gls.left[10] = {
|
||||
DiagnosticWarn = {
|
||||
provider = "DiagnosticWarn",
|
||||
icon = " ",
|
||||
highlight = {colors.yellow, colors.bg}
|
||||
}
|
||||
}
|
||||
|
||||
gls.left[11] = {
|
||||
DiagnosticHint = {
|
||||
provider = "DiagnosticHint",
|
||||
icon = " ",
|
||||
highlight = {colors.cyan, colors.bg}
|
||||
}
|
||||
}
|
||||
|
||||
gls.left[12] = {
|
||||
DiagnosticInfo = {
|
||||
provider = "DiagnosticInfo",
|
||||
icon = " ",
|
||||
highlight = {colors.blue, colors.bg}
|
||||
}
|
||||
}
|
||||
|
||||
gls.right[1] = {
|
||||
FileEncode = {
|
||||
provider = "FileEncode",
|
||||
condition = condition.hide_in_width,
|
||||
separator = " ",
|
||||
separator_highlight = {"NONE", colors.bg},
|
||||
highlight = {colors.green, colors.bg, "bold"}
|
||||
}
|
||||
}
|
||||
|
||||
gls.right[2] = {
|
||||
FileFormat = {
|
||||
provider = "FileFormat",
|
||||
condition = condition.hide_in_width,
|
||||
separator = " ",
|
||||
separator_highlight = {"NONE", colors.bg},
|
||||
highlight = {colors.green, colors.bg, "bold"}
|
||||
}
|
||||
}
|
||||
|
||||
gls.right[3] = {
|
||||
GitIcon = {
|
||||
provider = function()
|
||||
return " "
|
||||
end,
|
||||
condition = condition.check_git_workspace,
|
||||
separator = " ",
|
||||
separator_highlight = {"NONE", colors.bg},
|
||||
highlight = {colors.violet, colors.bg, "bold"}
|
||||
}
|
||||
}
|
||||
|
||||
gls.right[4] = {
|
||||
GitBranch = {
|
||||
provider = "GitBranch",
|
||||
condition = condition.check_git_workspace,
|
||||
highlight = {colors.violet, colors.bg, "bold"}
|
||||
}
|
||||
}
|
||||
|
||||
gls.right[5] = {
|
||||
DiffAdd = {
|
||||
provider = "DiffAdd",
|
||||
separator = " ",
|
||||
separator_highlight = {nil, colors.bg},
|
||||
condition = condition.hide_in_width,
|
||||
icon = " ",
|
||||
highlight = {colors.green, colors.bg}
|
||||
}
|
||||
}
|
||||
gls.right[6] = {
|
||||
DiffModified = {
|
||||
provider = "DiffModified",
|
||||
condition = condition.hide_in_width,
|
||||
icon = " 柳",
|
||||
highlight = {colors.orane, colors.bg}
|
||||
}
|
||||
}
|
||||
gls.right[7] = {
|
||||
DiffRemove = {
|
||||
provider = "DiffRemove",
|
||||
condition = condition.hide_in_width,
|
||||
icon = " ",
|
||||
highlight = {colors.red, colors.bg}
|
||||
}
|
||||
}
|
||||
|
||||
-- File type name
|
||||
-- --------------
|
||||
|
||||
gls.short_line_left[1] = {
|
||||
ShortLineFileName = {
|
||||
provider = "FileName",
|
||||
condition = condition.buffer_not_empty,
|
||||
highlight = {colors.fg, colors.bg},
|
||||
separator = " ",
|
||||
separator_highlight = {nil, colors.bg}
|
||||
}
|
||||
}
|
||||
|
||||
-- Buffer icon
|
||||
-- -----------
|
||||
|
||||
gls.short_line_right[1] = {
|
||||
BufferIcon = {
|
||||
provider = "BufferIcon",
|
||||
highlight = {colors.fg, colors.bg}
|
||||
}
|
||||
}
|
||||
|
|
@ -24,6 +24,9 @@ vim.fn.sign_define(
|
|||
{texthl = "LspDiagnosticsSignInformation", text = "", numhl = "LspDiagnosticsSignInformation"}
|
||||
)
|
||||
|
||||
--- Completion Icons
|
||||
require("lspkind").init({})
|
||||
|
||||
--- Languages
|
||||
require "lspconfig".bashls.setup {}
|
||||
require "lspconfig".ccls.setup {}
|
||||
|
|
@ -31,7 +34,6 @@ require "lspconfig".clangd.setup {}
|
|||
require "lspconfig".cssls.setup {}
|
||||
require "lspconfig".html.setup {}
|
||||
require "lspconfig".jsonls.setup {}
|
||||
require "lspconfig".pyls.setup {}
|
||||
require "lspconfig".pyright.setup {}
|
||||
require "lspconfig".tsserver.setup {}
|
||||
require "lspconfig".vimls.setup {}
|
||||
|
|
@ -95,8 +97,3 @@ local on_attach = function(client, bufnr)
|
|||
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)
|
||||
end
|
||||
|
||||
local servers = {"pyright", "rust_analyzer", "tsserver"}
|
||||
for _, lsp in ipairs(servers) do
|
||||
nvim_lsp[lsp].setup {on_attach = on_attach}
|
||||
end
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
vim.g.nvim_tree_auto_close = 1
|
||||
vim.g.nvim_tree_ignore = {".git", "node_modules", ".cache"}
|
||||
vim.g.nvim_tree_indent_markers = 1
|
||||
vim.api.nvim_set_keymap("", "<TAB>", ":NvimTreeFindFile<CR>", {})
|
||||
|
||||
vim.g.nvim_tree_icons = {
|
||||
default = "",
|
||||
symlink = "",
|
||||
git = {
|
||||
unstaged = "✗",
|
||||
staged = "✓",
|
||||
unmerged = "",
|
||||
renamed = "➜",
|
||||
untracked = "★"
|
||||
},
|
||||
folder = {
|
||||
default = "",
|
||||
open = "",
|
||||
symlink = ""
|
||||
}
|
||||
}
|
||||
|
||||
vim.g.nvim_tree_disable_default_keybindings = 1
|
||||
|
||||
local tree_cb = require "nvim-tree.config".nvim_tree_callback
|
||||
-- default mappings
|
||||
vim.g.nvim_tree_bindings = {
|
||||
{key = {"<CR>", "o", "<2-LeftMouse>"}, cb = tree_cb("edit")},
|
||||
{key = {"<2-RightMouse>", "<C-]>"}, cb = tree_cb("cd")},
|
||||
{key = "s", cb = tree_cb("vsplit")},
|
||||
{key = "i", cb = tree_cb("split")},
|
||||
{key = "t", cb = tree_cb("tabnew")},
|
||||
{key = "<", cb = tree_cb("prev_sibling")},
|
||||
{key = ">", cb = tree_cb("next_sibling")},
|
||||
{key = "P", cb = tree_cb("parent_node")},
|
||||
{key = "<BS>", cb = tree_cb("close_node")},
|
||||
{key = "<S-CR>", cb = tree_cb("close_node")},
|
||||
{key = "<Tab>", cb = tree_cb("preview")},
|
||||
{key = "K", cb = tree_cb("first_sibling")},
|
||||
{key = "J", cb = tree_cb("last_sibling")},
|
||||
{key = "I", cb = tree_cb("toggle_ignored")},
|
||||
{key = "I", cb = tree_cb("toggle_dotfiles")},
|
||||
{key = "r", cb = tree_cb("refresh")},
|
||||
{key = "a", cb = tree_cb("create")},
|
||||
{key = "d", cb = tree_cb("remove")},
|
||||
{key = "m", cb = tree_cb("rename")},
|
||||
{key = "<C-r>", cb = tree_cb("full_rename")},
|
||||
{key = "x", cb = tree_cb("cut")},
|
||||
{key = "c", cb = tree_cb("copy")},
|
||||
{key = "p", cb = tree_cb("paste")},
|
||||
{key = "y", cb = tree_cb("copy_name")},
|
||||
{key = "Y", cb = tree_cb("copy_path")},
|
||||
{key = "gy", cb = tree_cb("copy_absolute_path")},
|
||||
{key = "[c", cb = tree_cb("prev_git_item")},
|
||||
{key = "]c", cb = tree_cb("next_git_item")},
|
||||
{key = "-", cb = tree_cb("dir_up")},
|
||||
{key = "q", cb = tree_cb("close")},
|
||||
{key = "?", cb = tree_cb("toggle_help")}
|
||||
}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
vim.g.signify_sign_add = "│"
|
||||
vim.g.signify_sign_change = "│"
|
||||
|
|
@ -0,0 +1,228 @@
|
|||
-- Automatically generated packer.nvim plugin loader code
|
||||
|
||||
if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then
|
||||
vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"')
|
||||
return
|
||||
end
|
||||
|
||||
vim.api.nvim_command('packadd packer.nvim')
|
||||
|
||||
local no_errors, error_msg = pcall(function()
|
||||
|
||||
local time
|
||||
local profile_info
|
||||
local should_profile = false
|
||||
if should_profile then
|
||||
local hrtime = vim.loop.hrtime
|
||||
profile_info = {}
|
||||
time = function(chunk, start)
|
||||
if start then
|
||||
profile_info[chunk] = hrtime()
|
||||
else
|
||||
profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
|
||||
end
|
||||
end
|
||||
else
|
||||
time = function(chunk, start) end
|
||||
end
|
||||
|
||||
local function save_profiles(threshold)
|
||||
local sorted_times = {}
|
||||
for chunk_name, time_taken in pairs(profile_info) do
|
||||
sorted_times[#sorted_times + 1] = {chunk_name, time_taken}
|
||||
end
|
||||
table.sort(sorted_times, function(a, b) return a[2] > b[2] end)
|
||||
local results = {}
|
||||
for i, elem in ipairs(sorted_times) do
|
||||
if not threshold or threshold and elem[2] > threshold then
|
||||
results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
|
||||
end
|
||||
end
|
||||
|
||||
_G._packer = _G._packer or {}
|
||||
_G._packer.profile_output = results
|
||||
end
|
||||
|
||||
time([[Luarocks path setup]], true)
|
||||
local package_path_str = "/home/gordon/.cache/nvim/packer_hererocks/2.0.5/share/lua/5.1/?.lua;/home/gordon/.cache/nvim/packer_hererocks/2.0.5/share/lua/5.1/?/init.lua;/home/gordon/.cache/nvim/packer_hererocks/2.0.5/lib/luarocks/rocks-5.1/?.lua;/home/gordon/.cache/nvim/packer_hererocks/2.0.5/lib/luarocks/rocks-5.1/?/init.lua"
|
||||
local install_cpath_pattern = "/home/gordon/.cache/nvim/packer_hererocks/2.0.5/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
|
||||
|
||||
time([[Luarocks path setup]], false)
|
||||
time([[try_loadstring definition]], true)
|
||||
local function try_loadstring(s, component, name)
|
||||
local success, result = pcall(loadstring(s))
|
||||
if not success then
|
||||
vim.schedule(function()
|
||||
vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
|
||||
end)
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
time([[try_loadstring definition]], false)
|
||||
time([[Defining packer_plugins]], true)
|
||||
_G.packer_plugins = {
|
||||
["formatter.nvim"] = {
|
||||
config = { "\27LJ\1\0021\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\22plugins/formatter\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/gordon/.local/share/nvim/site/pack/packer/start/formatter.nvim"
|
||||
},
|
||||
["galaxyline.nvim"] = {
|
||||
config = { "\27LJ\1\0022\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\23plugins/galaxyline\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/gordon/.local/share/nvim/site/pack/packer/start/galaxyline.nvim"
|
||||
},
|
||||
kommentary = {
|
||||
config = { "\27LJ\1\2^\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\25update_commentstring&ts_context_commentstring.internal\frequire¾\1\1\0\4\0\a\0\n4\0\0\0%\1\1\0>\0\2\0027\0\2\0%\1\3\0003\2\4\0001\3\5\0:\3\6\2>\0\3\1G\0\1\0\18hook_function\0\1\0\2\31multi_line_comment_strings\tauto\31single_line_comment_string\tauto\20typescriptreact\23configure_language\22kommentary.config\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/gordon/.local/share/nvim/site/pack/packer/start/kommentary"
|
||||
},
|
||||
["lspkind-nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/gordon/.local/share/nvim/site/pack/packer/start/lspkind-nvim"
|
||||
},
|
||||
["monokai.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/gordon/.local/share/nvim/site/pack/packer/start/monokai.nvim"
|
||||
},
|
||||
["numb.nvim"] = {
|
||||
config = { "\27LJ\1\0022\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\tnumb\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/gordon/.local/share/nvim/site/pack/packer/start/numb.nvim"
|
||||
},
|
||||
["nvim-autopairs"] = {
|
||||
loaded = true,
|
||||
path = "/home/gordon/.local/share/nvim/site/pack/packer/start/nvim-autopairs"
|
||||
},
|
||||
["nvim-blame-line"] = {
|
||||
config = { "\27LJ\1\2R\0\0\2\1\3\0\6+\0\0\0007\0\0\0007\0\1\0%\1\2\0>\0\2\1G\0\1\0\0\0'autocmd BufEnter * EnableBlameLine\14nvim_exec\bapi\0" },
|
||||
loaded = true,
|
||||
path = "/home/gordon/.local/share/nvim/site/pack/packer/start/nvim-blame-line"
|
||||
},
|
||||
["nvim-colorizer.lua"] = {
|
||||
config = { "\27LJ\1\0027\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\14colorizer\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/gordon/.local/share/nvim/site/pack/packer/start/nvim-colorizer.lua"
|
||||
},
|
||||
["nvim-compe"] = {
|
||||
config = { "\27LJ\1\2-\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\18plugins/compe\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/gordon/.local/share/nvim/site/pack/packer/start/nvim-compe"
|
||||
},
|
||||
["nvim-lspconfig"] = {
|
||||
config = { "\27LJ\1\2+\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\16plugins/lsp\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/gordon/.local/share/nvim/site/pack/packer/start/nvim-lspconfig"
|
||||
},
|
||||
["nvim-lsputils"] = {
|
||||
loaded = true,
|
||||
path = "/home/gordon/.local/share/nvim/site/pack/packer/start/nvim-lsputils"
|
||||
},
|
||||
["nvim-tree.lua"] = {
|
||||
config = { "\27LJ\1\0021\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\22plugins/nvim-tree\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/gordon/.local/share/nvim/site/pack/packer/start/nvim-tree.lua"
|
||||
},
|
||||
["nvim-treesitter"] = {
|
||||
config = { "\27LJ\1\2œ\2\0\0\3\0\14\0\0214\0\0\0%\1\1\0>\0\2\0027\0\2\0003\1\3\0>\0\2\0014\0\0\0%\1\4\0>\0\2\0027\0\2\0003\1\6\0003\2\5\0:\2\a\0013\2\b\0:\2\t\0013\2\n\0:\2\v\0013\2\f\0:\2\r\1>\0\2\1G\0\1\0\fautotag\1\0\1\venable\2\vindent\1\0\1\venable\2\14highlight\1\0\1\venable\2\26context_commentstring\1\0\0\1\0\2\19enable_autocmd\2\venable\2\28nvim-treesitter.configs\1\0\1\30enable_check_bracket_line\2\nsetup\19nvim-autopairs\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/gordon/.local/share/nvim/site/pack/packer/start/nvim-treesitter"
|
||||
},
|
||||
["nvim-ts-autotag"] = {
|
||||
loaded = true,
|
||||
path = "/home/gordon/.local/share/nvim/site/pack/packer/start/nvim-ts-autotag"
|
||||
},
|
||||
["nvim-ts-context-commentstring"] = {
|
||||
loaded = true,
|
||||
path = "/home/gordon/.local/share/nvim/site/pack/packer/start/nvim-ts-context-commentstring"
|
||||
},
|
||||
["nvim-web-devicons"] = {
|
||||
loaded = true,
|
||||
path = "/home/gordon/.local/share/nvim/site/pack/packer/start/nvim-web-devicons"
|
||||
},
|
||||
["packer.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/gordon/.local/share/nvim/site/pack/packer/start/packer.nvim"
|
||||
},
|
||||
["plenary.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/gordon/.local/share/nvim/site/pack/packer/start/plenary.nvim"
|
||||
},
|
||||
popfix = {
|
||||
loaded = true,
|
||||
path = "/home/gordon/.local/share/nvim/site/pack/packer/start/popfix"
|
||||
},
|
||||
["popup.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/gordon/.local/share/nvim/site/pack/packer/start/popup.nvim"
|
||||
},
|
||||
["telescope.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/gordon/.local/share/nvim/site/pack/packer/start/telescope.nvim"
|
||||
},
|
||||
["vim-signify"] = {
|
||||
config = { "\27LJ\1\2/\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\20plugins/signify\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/gordon/.local/share/nvim/site/pack/packer/start/vim-signify"
|
||||
}
|
||||
}
|
||||
|
||||
time([[Defining packer_plugins]], false)
|
||||
-- Config for: formatter.nvim
|
||||
time([[Config for formatter.nvim]], true)
|
||||
try_loadstring("\27LJ\1\0021\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\22plugins/formatter\frequire\0", "config", "formatter.nvim")
|
||||
time([[Config for formatter.nvim]], false)
|
||||
-- Config for: nvim-treesitter
|
||||
time([[Config for nvim-treesitter]], true)
|
||||
try_loadstring("\27LJ\1\2œ\2\0\0\3\0\14\0\0214\0\0\0%\1\1\0>\0\2\0027\0\2\0003\1\3\0>\0\2\0014\0\0\0%\1\4\0>\0\2\0027\0\2\0003\1\6\0003\2\5\0:\2\a\0013\2\b\0:\2\t\0013\2\n\0:\2\v\0013\2\f\0:\2\r\1>\0\2\1G\0\1\0\fautotag\1\0\1\venable\2\vindent\1\0\1\venable\2\14highlight\1\0\1\venable\2\26context_commentstring\1\0\0\1\0\2\19enable_autocmd\2\venable\2\28nvim-treesitter.configs\1\0\1\30enable_check_bracket_line\2\nsetup\19nvim-autopairs\frequire\0", "config", "nvim-treesitter")
|
||||
time([[Config for nvim-treesitter]], false)
|
||||
-- Config for: nvim-colorizer.lua
|
||||
time([[Config for nvim-colorizer.lua]], true)
|
||||
try_loadstring("\27LJ\1\0027\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\14colorizer\frequire\0", "config", "nvim-colorizer.lua")
|
||||
time([[Config for nvim-colorizer.lua]], false)
|
||||
-- Config for: nvim-compe
|
||||
time([[Config for nvim-compe]], true)
|
||||
try_loadstring("\27LJ\1\2-\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\18plugins/compe\frequire\0", "config", "nvim-compe")
|
||||
time([[Config for nvim-compe]], false)
|
||||
-- Config for: numb.nvim
|
||||
time([[Config for numb.nvim]], true)
|
||||
try_loadstring("\27LJ\1\0022\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\tnumb\frequire\0", "config", "numb.nvim")
|
||||
time([[Config for numb.nvim]], false)
|
||||
-- Config for: nvim-blame-line
|
||||
time([[Config for nvim-blame-line]], true)
|
||||
try_loadstring("\27LJ\1\2R\0\0\2\1\3\0\6+\0\0\0007\0\0\0007\0\1\0%\1\2\0>\0\2\1G\0\1\0\0\0'autocmd BufEnter * EnableBlameLine\14nvim_exec\bapi\0", "config", "nvim-blame-line")
|
||||
time([[Config for nvim-blame-line]], false)
|
||||
-- Config for: vim-signify
|
||||
time([[Config for vim-signify]], true)
|
||||
try_loadstring("\27LJ\1\2/\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\20plugins/signify\frequire\0", "config", "vim-signify")
|
||||
time([[Config for vim-signify]], false)
|
||||
-- Config for: kommentary
|
||||
time([[Config for kommentary]], true)
|
||||
try_loadstring("\27LJ\1\2^\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\25update_commentstring&ts_context_commentstring.internal\frequire¾\1\1\0\4\0\a\0\n4\0\0\0%\1\1\0>\0\2\0027\0\2\0%\1\3\0003\2\4\0001\3\5\0:\3\6\2>\0\3\1G\0\1\0\18hook_function\0\1\0\2\31multi_line_comment_strings\tauto\31single_line_comment_string\tauto\20typescriptreact\23configure_language\22kommentary.config\frequire\0", "config", "kommentary")
|
||||
time([[Config for kommentary]], false)
|
||||
-- Config for: galaxyline.nvim
|
||||
time([[Config for galaxyline.nvim]], true)
|
||||
try_loadstring("\27LJ\1\0022\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\23plugins/galaxyline\frequire\0", "config", "galaxyline.nvim")
|
||||
time([[Config for galaxyline.nvim]], false)
|
||||
-- Config for: nvim-lspconfig
|
||||
time([[Config for nvim-lspconfig]], true)
|
||||
try_loadstring("\27LJ\1\2+\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\16plugins/lsp\frequire\0", "config", "nvim-lspconfig")
|
||||
time([[Config for nvim-lspconfig]], false)
|
||||
-- Config for: nvim-tree.lua
|
||||
time([[Config for nvim-tree.lua]], true)
|
||||
try_loadstring("\27LJ\1\0021\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\22plugins/nvim-tree\frequire\0", "config", "nvim-tree.lua")
|
||||
time([[Config for nvim-tree.lua]], false)
|
||||
if should_profile then save_profiles() end
|
||||
|
||||
end)
|
||||
|
||||
if not no_errors then
|
||||
vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
|
||||
end
|
||||
328
plugins.vim
328
plugins.vim
|
|
@ -1,328 +0,0 @@
|
|||
call plug#begin()
|
||||
Plug 'glepnir/galaxyline.nvim' , {'branch': 'main'}
|
||||
Plug 'kyazdani42/nvim-web-devicons' " for file icons
|
||||
Plug 'kyazdani42/nvim-tree.lua'
|
||||
Plug 'junegunn/goyo.vim'
|
||||
Plug 'JoosepAlviste/nvim-ts-context-commentstring'
|
||||
Plug 'tpope/vim-commentary'
|
||||
Plug 'mhinz/vim-signify'
|
||||
Plug 'neovim/nvim-lspconfig'
|
||||
Plug 'mhartington/formatter.nvim'
|
||||
Plug 'hrsh7th/nvim-compe'
|
||||
Plug 'onsails/lspkind-nvim'
|
||||
Plug 'MasterGordon/monokai.nvim'
|
||||
Plug 'ron89/thesaurus_query.vim'
|
||||
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
||||
Plug 'blackcauldron7/surround.nvim'
|
||||
Plug 'nvim-lua/popup.nvim'
|
||||
Plug 'nvim-lua/plenary.nvim'
|
||||
Plug 'nvim-telescope/telescope.nvim'
|
||||
Plug 'SidOfc/mkdx'
|
||||
Plug 'nacro90/numb.nvim'
|
||||
Plug 'glepnir/dashboard-nvim'
|
||||
Plug 'norcalli/nvim-colorizer.lua'
|
||||
Plug 'davidgranstrom/nvim-markdown-preview'
|
||||
Plug 'RishabhRD/popfix'
|
||||
Plug 'RishabhRD/nvim-lsputils'
|
||||
Plug 'akinsho/nvim-bufferline.lua'
|
||||
Plug 'folke/todo-comments.nvim'
|
||||
Plug 'windwp/nvim-ts-autotag'
|
||||
Plug 'jiangmiao/auto-pairs'
|
||||
Plug 'simrat39/symbols-outline.nvim'
|
||||
Plug 'ray-x/lsp_signature.nvim'
|
||||
|
||||
" post install (yarn install | npm install) then load plugin only for editing supported files
|
||||
call plug#end()
|
||||
|
||||
nmap <leader>f <CMD>Telescope find_files<CR>
|
||||
|
||||
lua require('numb').setup()
|
||||
|
||||
" Theme
|
||||
colorscheme monokai
|
||||
|
||||
" StatusLine
|
||||
luafile $HOME/.config/nvim/plugins/galaxyline.lua
|
||||
|
||||
" Lsp Signature
|
||||
" lua require'lsp_signature'.on_attach()
|
||||
|
||||
" Dashboard
|
||||
let g:dashboard_default_executive ='telescope'
|
||||
nnoremap <silent> <Leader>r :DashboardFindHistory<CR>
|
||||
|
||||
" Startify
|
||||
let g:startify_custom_header = startify#pad(split(system('cat $HOME/.config/nvim/splash'), '\n'))
|
||||
lua << EOF
|
||||
function _G.webDevIcons(path)
|
||||
local filename = vim.fn.fnamemodify(path, ':t')
|
||||
local extension = vim.fn.fnamemodify(path, ':e')
|
||||
return require'nvim-web-devicons'.get_icon(filename, extension, { default = true })
|
||||
end
|
||||
EOF
|
||||
|
||||
function! StartifyEntryFormat() abort
|
||||
return 'v:lua.webDevIcons(absolute_path) . " " . entry_path'
|
||||
endfunction
|
||||
|
||||
" commentstring
|
||||
lua << EOF
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
context_commentstring = {
|
||||
enable = true
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
" Outline
|
||||
noremap <silent> <leader>o :SymbolsOutline<CR>
|
||||
|
||||
" Bufferline
|
||||
lua <<EOF
|
||||
diagnostics_indicator = function(count, level, diagnostics_dict, context)
|
||||
local s = " "
|
||||
for e, n in pairs(diagnostics_dict) do
|
||||
local sym = e == "error" and " "
|
||||
or (e == "warning" and " " or "" )
|
||||
s = s .. n .. sym
|
||||
end
|
||||
return s
|
||||
end
|
||||
require'bufferline'.setup{
|
||||
options = {
|
||||
always_show_bufferline = true,
|
||||
diagnostics_indicator = diagnostics_indicator,
|
||||
diagnostics = "nvim_lsp",
|
||||
separator_style = "thin"
|
||||
}
|
||||
}
|
||||
EOF
|
||||
noremap <silent> <A-1> :lua require"bufferline".go_to_buffer(1)<CR>
|
||||
noremap <silent> <A-2> :lua require"bufferline".go_to_buffer(2)<CR>
|
||||
noremap <silent> <A-3> :lua require"bufferline".go_to_buffer(3)<CR>
|
||||
noremap <silent> <A-4> :lua require"bufferline".go_to_buffer(4)<CR>
|
||||
noremap <silent> <A-5> :lua require"bufferline".go_to_buffer(5)<CR>
|
||||
noremap <silent> <A-6> :lua require"bufferline".go_to_buffer(6)<CR>
|
||||
noremap <silent> <A-7> :lua require"bufferline".go_to_buffer(7)<CR>
|
||||
noremap <silent> <A-8> :lua require"bufferline".go_to_buffer(8)<CR>
|
||||
noremap <silent> <A-9> :lua require"bufferline".go_to_buffer(9)<CR>
|
||||
noremap <silent> <A-0> :lua require"bufferline".go_to_buffer(10)<CR>
|
||||
noremap <A-Left> <C-w><Left>
|
||||
noremap <A-Up> <C-w><Up>
|
||||
noremap <A-Down> <C-w><Down>
|
||||
noremap <A-Right> <C-w><Right>
|
||||
|
||||
" colorizer
|
||||
lua <<EOF
|
||||
require 'colorizer'.setup {
|
||||
'*'; -- Highlight all files, but customize some others.
|
||||
}
|
||||
EOF
|
||||
|
||||
" Prettier
|
||||
command! -nargs=0 Prettier :CocCommand prettier.formatFile
|
||||
map <leader>p :Prettier<CR>
|
||||
|
||||
" Surround
|
||||
lua require"surround".setup{}
|
||||
|
||||
" NVim Tree Config
|
||||
let g:nvim_tree_auto_close = 1
|
||||
let g:nvim_tree_ignore = [ '.git', 'node_modules', '.cache' ]
|
||||
let g:nvim_tree_indent_markers = 1
|
||||
map <TAB> :NvimTreeFindFile<CR>
|
||||
|
||||
let g:nvim_tree_icons = {
|
||||
\ 'default': '',
|
||||
\ 'symlink': '',
|
||||
\ 'git': {
|
||||
\ 'unstaged': "✗",
|
||||
\ 'staged': "✓",
|
||||
\ 'unmerged': "",
|
||||
\ 'renamed': "➜",
|
||||
\ 'untracked': "★"
|
||||
\ },
|
||||
\ 'folder': {
|
||||
\ 'default': "",
|
||||
\ 'open': "",
|
||||
\ 'symlink': "",
|
||||
\ }
|
||||
\ }
|
||||
|
||||
let g:nvim_tree_disable_default_keybindings = 1
|
||||
|
||||
lua <<EOF
|
||||
local tree_cb = require'nvim-tree.config'.nvim_tree_callback
|
||||
-- default mappings
|
||||
vim.g.nvim_tree_bindings = {
|
||||
{ key = {"<CR>", "o", "<2-LeftMouse>"}, cb = tree_cb("edit") },
|
||||
{ key = {"<2-RightMouse>", "<C-]>"}, cb = tree_cb("cd") },
|
||||
{ key = "s", cb = tree_cb("vsplit") },
|
||||
{ key = "i", cb = tree_cb("split") },
|
||||
{ key = "t", cb = tree_cb("tabnew") },
|
||||
{ key = "<", cb = tree_cb("prev_sibling") },
|
||||
{ key = ">", cb = tree_cb("next_sibling") },
|
||||
{ key = "P", cb = tree_cb("parent_node") },
|
||||
{ key = "<BS>", cb = tree_cb("close_node") },
|
||||
{ key = "<S-CR>", cb = tree_cb("close_node") },
|
||||
{ key = "<Tab>", cb = tree_cb("preview") },
|
||||
{ key = "K", cb = tree_cb("first_sibling") },
|
||||
{ key = "J", cb = tree_cb("last_sibling") },
|
||||
{ key = "I", cb = tree_cb("toggle_ignored") },
|
||||
{ key = "I", cb = tree_cb("toggle_dotfiles") },
|
||||
{ key = "r", cb = tree_cb("refresh") },
|
||||
{ key = "c", cb = tree_cb("create") },
|
||||
{ key = "d", cb = tree_cb("remove") },
|
||||
{ key = "m", cb = tree_cb("rename") },
|
||||
{ key = "<C-r>", cb = tree_cb("full_rename") },
|
||||
{ key = "x", cb = tree_cb("cut") },
|
||||
{ key = "c", cb = tree_cb("copy") },
|
||||
{ key = "p", cb = tree_cb("paste") },
|
||||
{ key = "y", cb = tree_cb("copy_name") },
|
||||
{ key = "Y", cb = tree_cb("copy_path") },
|
||||
{ key = "gy", cb = tree_cb("copy_absolute_path") },
|
||||
{ key = "[c", cb = tree_cb("prev_git_item") },
|
||||
{ key = "]c", cb = tree_cb("next_git_item") },
|
||||
{ key = "-", cb = tree_cb("dir_up") },
|
||||
{ key = "q", cb = tree_cb("close") },
|
||||
{ key = "?", cb = tree_cb("toggle_help") },
|
||||
}
|
||||
EOF
|
||||
|
||||
" TreeSitter
|
||||
lua <<EOF
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
highlight = {
|
||||
enable = true,
|
||||
},
|
||||
indent = {
|
||||
enable = true
|
||||
},
|
||||
}
|
||||
EOF
|
||||
|
||||
" Closetag
|
||||
let g:closetag_filenames = '*.html,*.xhtml,*.phtml,*.mako,*.jsx,*.tsx'
|
||||
|
||||
" TS-Autotag
|
||||
luafile $HOME/.config/nvim/plugins/autotag.lua
|
||||
" Thesaurus
|
||||
nnoremap <Leader>s :ThesaurusQueryReplaceCurrentWord<CR>
|
||||
let g:tq_language=['en', 'de']
|
||||
let g:tq_enabled_backends=["openthesaurus_de", "woxikon_de", "openoffice_en", "datamuse_com"]
|
||||
|
||||
" Tagalong
|
||||
let g:tagalong_verbose = 1
|
||||
let g:tagalong_filetypes = ['html', 'xml', 'jsx', 'tsx', 'eruby', 'ejs', 'eco', 'php', 'htmldjango', 'javascriptreact', 'typescriptreact', 'typescript.tsx', 'javascript.jsx', 'mako']
|
||||
let g:tagalong_additional_filetypes = ['typescript.tsx', 'javascript.jsx', 'mako']
|
||||
|
||||
" coc.nvim
|
||||
" source plugins/coc.vim
|
||||
|
||||
" nvim-lsp
|
||||
luafile $HOME/.config/nvim/plugins/lsp.lua
|
||||
|
||||
" Formatter
|
||||
luafile $HOME/.config/nvim/plugins/formatter.lua
|
||||
|
||||
" nvim.compe
|
||||
luafile $HOME/.config/nvim/plugins/compe.lua
|
||||
inoremap <silent><expr> <C-Space> compe#complete()
|
||||
inoremap <silent><expr> <CR> compe#confirm('<CR>')
|
||||
inoremap <silent><expr> <C-e> compe#close('<C-e>')
|
||||
inoremap <silent><expr> <C-f> compe#scroll({ 'delta': +4 })
|
||||
inoremap <silent><expr> <C-d> compe#scroll({ 'delta': -4 })
|
||||
|
||||
" lspkind
|
||||
lua <<EOF
|
||||
require('lspkind').init({
|
||||
-- with_text = true,
|
||||
-- symbol_map = {
|
||||
-- Text = '',
|
||||
-- Method = 'ƒ',
|
||||
-- Function = '',
|
||||
-- Constructor = '',
|
||||
-- Variable = '',
|
||||
-- Class = '',
|
||||
-- Interface = 'ﰮ',
|
||||
-- Module = '',
|
||||
-- Property = '',
|
||||
-- Unit = '',
|
||||
-- Value = '',
|
||||
-- Enum = '了',
|
||||
-- Keyword = '',
|
||||
-- Snippet = '',
|
||||
-- Color = '',
|
||||
-- File = '',
|
||||
-- Folder = '',
|
||||
-- EnumMember = '',
|
||||
-- Constant = '',
|
||||
-- Struct = ''
|
||||
-- },
|
||||
})
|
||||
EOF
|
||||
|
||||
" vim-signify
|
||||
|
||||
let g:signify_sign_add = '│'
|
||||
let g:signify_sign_change = '│'
|
||||
|
||||
" todo-comments
|
||||
lua << EOF
|
||||
require("todo-comments").setup (
|
||||
{
|
||||
signs = true, -- show icons in the signs column
|
||||
sign_priority = 20, -- sign priority
|
||||
-- keywords recognized as todo comments
|
||||
keywords = {
|
||||
FIX = {
|
||||
icon = " ", -- icon used for the sign, and in search results
|
||||
color = "error", -- can be a hex color, or a named color (see below)
|
||||
alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords
|
||||
-- signs = false, -- configure signs for some keywords individually
|
||||
},
|
||||
TODO = { icon = " ", color = "info" },
|
||||
HACK = { icon = " ", color = "warning" },
|
||||
WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } },
|
||||
PERF = { icon = " ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } },
|
||||
NOTE = { icon = " ", color = "hint", alt = { "INFO" } },
|
||||
},
|
||||
merge_keywords = true, -- when true, custom keywords will be merged with the defaults
|
||||
-- highlighting of the line containing the todo comment
|
||||
-- * before: highlights before the keyword (typically comment characters)
|
||||
-- * keyword: highlights of the keyword
|
||||
-- * after: highlights after the keyword (todo text)
|
||||
highlight = {
|
||||
before = "", -- "fg" or "bg" or empty
|
||||
keyword = "wide", -- "fg", "bg", "wide" or empty. (wide is the same as bg, but will also highlight surrounding characters)
|
||||
after = "fg", -- "fg" or "bg" or empty
|
||||
pattern = [[.*<(KEYWORDS)\s*:]], -- pattern used for highlightng (vim regex)
|
||||
comments_only = true, -- uses treesitter to match keywords in comments only
|
||||
max_line_len = 400, -- ignore lines longer than this
|
||||
},
|
||||
-- list of named colors where we try to extract the guifg from the
|
||||
-- list of hilight groups or use the hex color if hl not found as a fallback
|
||||
colors = {
|
||||
error = { "LspDiagnosticsDefaultError", "ErrorMsg", "#DC2626" },
|
||||
warning = { "LspDiagnosticsDefaultWarning", "WarningMsg", "#FBBF24" },
|
||||
info = { "LspDiagnosticsDefaultInformation", "#2563EB" },
|
||||
hint = { "LspDiagnosticsDefaultHint", "#10B981" },
|
||||
default = { "Identifier", "#7C3AED" },
|
||||
},
|
||||
search = {
|
||||
command = "rg",
|
||||
args = {
|
||||
"--color=never",
|
||||
"--no-heading",
|
||||
"--with-filename",
|
||||
"--line-number",
|
||||
"--column",
|
||||
},
|
||||
-- regex that will be used to match keywords.
|
||||
-- don't replace the (KEYWORDS) placeholder
|
||||
pattern = [[\b(KEYWORDS):]], -- ripgrep regex
|
||||
-- pattern = [[\b(KEYWORDS)\b]], -- match without the extra colon. You'll likely get false positives
|
||||
},
|
||||
}
|
||||
)
|
||||
EOF
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
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;
|
||||
nvim_lsp = true;
|
||||
nvim_lua = true;
|
||||
vsnip = false;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -1,214 +0,0 @@
|
|||
local gl = require('galaxyline')
|
||||
local colors = require('galaxyline.theme').default
|
||||
local monokai = require('monokai')
|
||||
local condition = require('galaxyline.condition')
|
||||
local gls = gl.section
|
||||
colors.bg = monokai.bg;
|
||||
gl.short_line_list = {'NvimTree','vista','dbui','packer'}
|
||||
|
||||
gls.left[2] = {
|
||||
ViMode = {
|
||||
provider = function()
|
||||
-- auto change color according the vim mode
|
||||
local mode_color = {n = colors.green, i = colors.red,v=colors.blue,
|
||||
[''] = colors.blue,V=colors.blue,
|
||||
c = colors.magenta,no = colors.red,s = colors.orange,
|
||||
S=colors.orange,[''] = colors.orange,
|
||||
ic = colors.yellow,R = colors.violet,Rv = colors.violet,
|
||||
cv = colors.red,ce=colors.red, r = colors.cyan,
|
||||
rm = colors.cyan, ['r?'] = colors.cyan,
|
||||
['!'] = colors.red,t = colors.red}
|
||||
local mode_map = {
|
||||
['n'] = 'NORMAL ',
|
||||
['no'] = 'N·OPERATOR PENDING ',
|
||||
['v'] = 'VISUAL ',
|
||||
['V'] = 'V·LINE ',
|
||||
[''] = 'V·BLOCK ',
|
||||
['s'] = 'SELECT ',
|
||||
['S'] = 'S·LINE ',
|
||||
[''] = 'S·BLOCK ',
|
||||
['i'] = 'INSERT ',
|
||||
['R'] = 'REPLACE ',
|
||||
['Rv'] = 'V·REPLACE ',
|
||||
['c'] = 'COMMAND ',
|
||||
['cv'] = 'VIM EX ',
|
||||
['ce'] = 'EX ',
|
||||
['r'] = 'PROMPT ',
|
||||
['rm'] = 'MORE ',
|
||||
['r?'] = 'CONFIRM ',
|
||||
['!'] = 'SHELL ',
|
||||
['t'] = 'TERMINAL '}
|
||||
vim.api.nvim_command('hi GalaxyViMode guibg='..mode_color[vim.fn.mode()])
|
||||
return ' '..mode_map[vim.fn.mode()]
|
||||
end,
|
||||
separator = ' ',
|
||||
separator_highlight = {nil,colors.bg},
|
||||
highlight = {colors.bg,colors.bg,'bold'},
|
||||
},
|
||||
}
|
||||
gls.left[3] = {
|
||||
Macro = {
|
||||
provider = function()
|
||||
local reg = vim.fn.reg_recording()
|
||||
|
||||
if (reg == nil) or (reg == '') then
|
||||
return ''
|
||||
else
|
||||
return ' ' .. vim.call('reg_recording') .. ' '
|
||||
end
|
||||
end,
|
||||
highlight = {colors.red, colors.bg},
|
||||
}
|
||||
}
|
||||
gls.left[5] ={
|
||||
FileIcon = {
|
||||
provider = 'FileIcon',
|
||||
condition = condition.buffer_not_empty,
|
||||
highlight = {require('galaxyline.provider_fileinfo').get_file_icon_color,colors.bg},
|
||||
},
|
||||
}
|
||||
|
||||
gls.left[6] = {
|
||||
FileName = {
|
||||
provider = 'FileName',
|
||||
condition = condition.buffer_not_empty,
|
||||
highlight = {colors.magenta,colors.bg,'bold'}
|
||||
}
|
||||
}
|
||||
|
||||
gls.left[7] = {
|
||||
LineInfo = {
|
||||
provider = 'LineColumn',
|
||||
separator = ' ',
|
||||
separator_highlight = {'NONE',colors.bg},
|
||||
highlight = {colors.fg,colors.bg},
|
||||
},
|
||||
}
|
||||
|
||||
gls.left[8] = {
|
||||
PerCent = {
|
||||
provider = 'LinePercent',
|
||||
separator = ' ',
|
||||
separator_highlight = {'NONE',colors.bg},
|
||||
highlight = {colors.fg,colors.bg,'bold'},
|
||||
}
|
||||
}
|
||||
|
||||
gls.left[9] = {
|
||||
DiagnosticError = {
|
||||
provider = 'DiagnosticError',
|
||||
icon = ' ',
|
||||
highlight = {colors.red,colors.bg}
|
||||
}
|
||||
}
|
||||
gls.left[10] = {
|
||||
DiagnosticWarn = {
|
||||
provider = 'DiagnosticWarn',
|
||||
icon = ' ',
|
||||
highlight = {colors.yellow,colors.bg},
|
||||
}
|
||||
}
|
||||
|
||||
gls.left[11] = {
|
||||
DiagnosticHint = {
|
||||
provider = 'DiagnosticHint',
|
||||
icon = ' ',
|
||||
highlight = {colors.cyan,colors.bg},
|
||||
}
|
||||
}
|
||||
|
||||
gls.left[12] = {
|
||||
DiagnosticInfo = {
|
||||
provider = 'DiagnosticInfo',
|
||||
icon = ' ',
|
||||
highlight = {colors.blue,colors.bg},
|
||||
}
|
||||
}
|
||||
|
||||
gls.right[1] = {
|
||||
FileEncode = {
|
||||
provider = 'FileEncode',
|
||||
condition = condition.hide_in_width,
|
||||
separator = ' ',
|
||||
separator_highlight = {'NONE',colors.bg},
|
||||
highlight = {colors.green,colors.bg,'bold'}
|
||||
}
|
||||
}
|
||||
|
||||
gls.right[2] = {
|
||||
FileFormat = {
|
||||
provider = 'FileFormat',
|
||||
condition = condition.hide_in_width,
|
||||
separator = ' ',
|
||||
separator_highlight = {'NONE',colors.bg},
|
||||
highlight = {colors.green,colors.bg,'bold'}
|
||||
}
|
||||
}
|
||||
|
||||
gls.right[3] = {
|
||||
GitIcon = {
|
||||
provider = function() return ' ' end,
|
||||
condition = condition.check_git_workspace,
|
||||
separator = ' ',
|
||||
separator_highlight = {'NONE',colors.bg},
|
||||
highlight = {colors.violet,colors.bg,'bold'},
|
||||
}
|
||||
}
|
||||
|
||||
gls.right[4] = {
|
||||
GitBranch = {
|
||||
provider = 'GitBranch',
|
||||
condition = condition.check_git_workspace,
|
||||
highlight = {colors.violet,colors.bg,'bold'},
|
||||
}
|
||||
}
|
||||
|
||||
gls.right[5] = {
|
||||
DiffAdd = {
|
||||
provider = 'DiffAdd',
|
||||
separator = ' ',
|
||||
separator_highlight = {nil,colors.bg},
|
||||
condition = condition.hide_in_width,
|
||||
icon = ' ',
|
||||
highlight = {colors.green,colors.bg},
|
||||
}
|
||||
}
|
||||
gls.right[6] = {
|
||||
DiffModified = {
|
||||
provider = 'DiffModified',
|
||||
condition = condition.hide_in_width,
|
||||
icon = ' 柳',
|
||||
highlight = {colors.orane,colors.bg},
|
||||
}
|
||||
}
|
||||
gls.right[7] = {
|
||||
DiffRemove = {
|
||||
provider = 'DiffRemove',
|
||||
condition = condition.hide_in_width,
|
||||
icon = ' ',
|
||||
highlight = {colors.red,colors.bg},
|
||||
}
|
||||
}
|
||||
|
||||
-- File type name
|
||||
-- --------------
|
||||
|
||||
gls.short_line_left[1] = {
|
||||
ShortLineFileName = {
|
||||
provider = 'FileName',
|
||||
condition = condition.buffer_not_empty,
|
||||
highlight = {colors.fg, colors.bg},
|
||||
separator = ' ',
|
||||
separator_highlight = {nil, colors.bg}
|
||||
},
|
||||
}
|
||||
|
||||
-- Buffer icon
|
||||
-- -----------
|
||||
|
||||
gls.short_line_right[1] = {
|
||||
BufferIcon = {
|
||||
provider = 'BufferIcon',
|
||||
highlight = {colors.fg, colors.bg},
|
||||
}
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
local saga = require 'lspsaga'
|
||||
|
||||
saga.init_lsp_saga {
|
||||
use_saga_diagnostic_sign = true,
|
||||
error_sign = '',
|
||||
warn_sign = '',
|
||||
hint_sign = '',
|
||||
infor_sign = '',
|
||||
dianostic_header_icon = ' ',
|
||||
code_action_icon = ' ',
|
||||
code_action_prompt = {
|
||||
enable = true,
|
||||
sign = true,
|
||||
sign_priority = 20,
|
||||
virtual_text = true,
|
||||
},
|
||||
finder_definition_icon = ' ',
|
||||
finder_reference_icon = ' ',
|
||||
max_preview_lines = 10, -- preview lines of lsp_finder and definition preview
|
||||
finder_action_keys = {
|
||||
open = 'o', vsplit = 's',split = 'i',quit = 'q',scroll_down = '<C-f>', scroll_up = '<C-b>' -- quit can be a table
|
||||
},
|
||||
code_action_keys = {
|
||||
quit = 'q',exec = '<CR>'
|
||||
},
|
||||
rename_action_keys = {
|
||||
quit = '<C-c>',exec = '<CR>' -- quit can be a table
|
||||
},
|
||||
definition_preview_icon = ' ',
|
||||
-- "single" "double" "round" "plus"
|
||||
border_style = "single",
|
||||
rename_prompt_prefix = '➤',
|
||||
-- if you don't use nvim-lspconfig you must pass your server name and
|
||||
-- the related filetypes into this table
|
||||
server_filetype_map = {},
|
||||
}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
git clone https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim
|
||||
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
data
|
||||
content
|
||||
app
|
||||
JS
|
||||
CSS
|
||||
JSON
|
||||
Frameworks
|
||||
cherrypy
|
||||
mappings
|
||||
Application
|
||||
templates
|
||||
Gordon
|
||||
author
|
||||
index
|
||||
request
|
||||
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue