first commit
This commit is contained in:
commit
78c3f04c30
|
@ -0,0 +1 @@
|
|||
.netrwhist
|
|
@ -0,0 +1,11 @@
|
|||
-- local config
|
||||
require('localconf')
|
||||
-- managing plugins
|
||||
require('plugins')
|
||||
-- managing lsp
|
||||
require('lspconf')
|
||||
-- keyboard mapping
|
||||
require('keymaps')
|
||||
|
||||
-- my custom functions and command
|
||||
require("my")
|
|
@ -0,0 +1,108 @@
|
|||
-- the function map(mode, lhs, rhs, opts)
|
||||
-- {mode} Mode short-name (map command prefix: "n", "i", "v", "x", …) or "!" for |:map!|, or empty string for |:map|.
|
||||
-- {lhs} Left-hand-side |{lhs}| of the mapping.
|
||||
-- {rhs} Right-hand-side |{rhs}| of the mapping.
|
||||
-- {opts} Optional parameters map. Accepts all |:map-arguments| as keys excluding |<buffer>| but including |noremap| and "desc". "desc" can be used to give a description to keymap. When called from Lua, also accepts a "callback" key that takes a Lua function to call when the mapping is executed. Values are Booleans. Unknown key is an error.
|
||||
local function noremap(mode, lhs, rhs, opts)
|
||||
local options = { noremap = true }
|
||||
if opts then
|
||||
options = vim.tbl_extend("force", options, opts)
|
||||
end
|
||||
vim.keymap.set(mode, lhs, rhs, options)
|
||||
end
|
||||
|
||||
|
||||
-- the function map(mode, lhs, rhs, opts)
|
||||
-- {mode} Mode short-name (map command prefix: "n", "i", "v", "x", …) or "!" for |:map!|, or empty string for |:map|.
|
||||
-- {lhs} Left-hand-side |{lhs}| of the mapping.
|
||||
-- {rhs} Right-hand-side |{rhs}| of the mapping.
|
||||
-- {opts} Optional parameters map. Accepts all |:map-arguments| as keys excluding |<buffer>| but including |noremap| and "desc". "desc" can be used to give a description to keymap. When called from Lua, also accepts a "callback" key that takes a Lua function to call when the mapping is executed. Values are Booleans. Unknown key is an error.
|
||||
local function map(mode, lhs, rhs, opts)
|
||||
vim.keymap.set(mode, lhs, rhs, opts)
|
||||
end
|
||||
|
||||
|
||||
--- simple note:
|
||||
--- noremap("i","...","...","...") equals to inoremap
|
||||
--- noremap("n","...","...","...") equals to nnoremap
|
||||
--- etc
|
||||
|
||||
-- ===
|
||||
-- === Remap space as leader key
|
||||
-- ===
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
|
||||
|
||||
-- ===
|
||||
-- === open init.vim file anytime
|
||||
-- ===
|
||||
noremap('n', '<leader>rc', '<cmd>tabedit ~/.config/nvim/init.lua<CR>', {})
|
||||
-- Quickly edit the configuration
|
||||
noremap('n', '<leader>fs', '<cmd>tabedit ~/.config/nvim/lua/plugins.lua<cr>', {})
|
||||
|
||||
-- ===
|
||||
-- === windows management
|
||||
-- ===
|
||||
-- use <space> + hjkl for moving the cursor around windows
|
||||
noremap('n', '<leader>w', '<C-w>w', {})
|
||||
noremap('n', '<leader>k', '<C-w>k', {})
|
||||
noremap('n', '<leader>h', '<C-w>h', {})
|
||||
noremap('n', '<leader>j', '<C-w>j', {})
|
||||
noremap('n', '<leader>l', '<C-w>l', {})
|
||||
-- resize splits with arrow keys
|
||||
noremap('n', '<up>', ':res +5<CR>', {})
|
||||
noremap('n', '<down>', ':res -5<CR>', {})
|
||||
noremap('n', '<left>', ':vertical resize-5<CR>', {})
|
||||
noremap('n', '<right>', ':vertical resize+5<CR>', {})
|
||||
|
||||
|
||||
--use Ctrl+jk for repaid warching
|
||||
noremap('n', '<C-j>', '5j', {})
|
||||
noremap('n', '<C-k>', '5k', {})
|
||||
|
||||
|
||||
--use alt+o to add a new line down
|
||||
noremap('i', '<A-o>', '<Esc>o', {})
|
||||
--use alt+O to add a new line up
|
||||
noremap('i', '<A-O>', '<Esc>O', {})
|
||||
--use <Esc> to exit terminal-mode
|
||||
noremap('t', '<Esc>', '<C-\\><C-n>', {})
|
||||
-- <leader>ra to start RnvimrToggle
|
||||
noremap('n', '<leader>ra', '<cmd>RnvimrToggle<cr>', {})
|
||||
|
||||
|
||||
-- telescope keymaps
|
||||
local telescope = require('telescope.builtin')
|
||||
map('n', '<leader>ff', telescope.find_files, {})
|
||||
map('n', '<leader>fg', telescope.live_grep, {})
|
||||
map('n', '<leader>b', telescope.buffers, {})
|
||||
map('n', '<leader>h', telescope.help_tags, {})
|
||||
|
||||
|
||||
|
||||
---
|
||||
---lsp attach function : mapping keys
|
||||
---
|
||||
local M = {}
|
||||
M.attach = function(client, bufnr) -- set up buffer keymaps, etc.
|
||||
|
||||
local bufopts = {silent=true, buffer=bufnr }
|
||||
local gp=require('goto-preview')
|
||||
noremap('n', '<leader>gd', gp.goto_preview_definition, bufopts)
|
||||
noremap('n', '<leader>gt', gp.goto_preview_type_definition, bufopts)
|
||||
noremap('n', '<leader>gr', gp.goto_preview_references, bufopts)
|
||||
noremap('n', '<leader>gi', gp.goto_preview_implementation, bufopts)
|
||||
noremap('n', '<leader>gx', gp.close_all_win, bufopts)
|
||||
--nnoremap gpi <cmd>lua require('goto-preview').goto_preview_implementation()<CR>
|
||||
|
||||
|
||||
noremap('n', 'K', vim.lsp.buf.hover, bufopts)
|
||||
noremap('n', '<space>rn', vim.lsp.buf.rename, bufopts)
|
||||
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
vim.o.number = true
|
||||
vim.o.showmatch = true
|
||||
vim.o.termguicolors = true
|
||||
vim.o.cursorline = true
|
||||
vim.o.wildmenu = true
|
||||
vim.o.ignorecase = true
|
||||
vim.o.encoding = "utf-8" -- 保存时的字符编码
|
||||
vim.o.fileencodings = "ucs-bom,utf-8,cp936" -- 字符编码
|
||||
vim.opt.signcolumn = "yes" -- 总是显示最左边的signcolumn
|
||||
|
||||
vim.o.foldcolumn = '1'
|
||||
vim.o.foldlevel = 99
|
||||
vim.o.foldlevelstart = 99
|
||||
vim.o.foldenable = true
|
||||
|
||||
vim.o.autoindent = true --自动缩进
|
||||
vim.o.smartindent = true --智能缩进
|
||||
|
||||
--- ===
|
||||
--- === set <TAB>'s width as 4 spaces
|
||||
--- ===
|
||||
vim.o.tabstop = 4
|
||||
vim.o.softtabstop = 4
|
||||
vim.o.shiftwidth = 4
|
||||
|
||||
--- ===
|
||||
--- === set colorscheme to one-nvim
|
||||
--- ===
|
||||
-- before setting colorscheme, setting whole background to be transparent
|
||||
vim.g.one_nvim_transparent_bg = true
|
||||
vim.cmd("colorscheme one-nvim")
|
||||
|
||||
|
||||
--- ===
|
||||
--- === change color
|
||||
--- ===
|
||||
---change popup menu's color
|
||||
--vim.api.nvim_set_hl(0, 'Pmenu', { fg = '#BBBBBB', bg = '#272727' })
|
||||
--vim.api.nvim_set_hl(0, 'PmenuSel', { fg = '#BBBBBB', bg = '#004b72' })
|
||||
--vim.api.nvim_set_hl(0, 'PmenuSbar', { fg = 'NONE', bg = '#343B41' })
|
||||
--vim.api.nvim_set_hl(0, 'PmenuThumb', { fg = 'NONE', bg = '#BBBBBB' })
|
||||
--
|
||||
-----change tab line's color
|
||||
--vim.api.nvim_set_hl(0, 'StatusLine', { fg = '#BBBBBB', bg = '#272727' })
|
||||
--vim.api.nvim_set_hl(0, 'StatusLineNC', { fg = '#BBBBBB', bg = '#272727' })
|
||||
--
|
||||
-----change status line's color
|
||||
----setting tab line's background color
|
||||
--vim.api.nvim_set_hl(0, 'TabLineFill', { fg = "NONE", bg = '#272727' })
|
||||
----setting unselected tab's color
|
||||
--vim.api.nvim_set_hl(0, 'TabLine', { fg = "NONE", bg = "#272727" })
|
||||
----setting selected tab's color
|
||||
--vim.api.nvim_set_hl(0, 'TabLineSel', { fg = "NONE", bg = "#777777" })
|
||||
--
|
||||
----setting WinSeparator color
|
||||
--vim.api.nvim_set_hl(0, 'WinSeparator', { fg = "NONE", bg = "#272727" })
|
||||
|
||||
--setting SignColumn color
|
||||
--vim.api.nvim_set_hl(0, 'SignColumn', { fg = "NONE", bg = "#000000" })
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
|
||||
-- Configure lsp information display style
|
||||
local M = {}
|
||||
|
||||
---
|
||||
---lsp diagnostic
|
||||
---
|
||||
--
|
||||
--call M.OpenDiagFloat() to open a floating windows with the diagnostic message for the current line
|
||||
--add M.OpenDiagFloat() to autocmd to auto-open floating diagnostic message for the current line
|
||||
M.OpenDiagFloat = function ()
|
||||
for _, winid in pairs(vim.api.nvim_tabpage_list_wins(0)) do
|
||||
if vim.api.nvim_win_get_config(winid).zindex then
|
||||
return
|
||||
end
|
||||
end
|
||||
vim.diagnostic.open_float({focusable = false})
|
||||
end
|
||||
|
||||
|
||||
|
||||
M.setup = function()
|
||||
-- replace the lsp info symbol
|
||||
local signs = {
|
||||
{ name = "DiagnosticSignError", text = "" },
|
||||
{ name = "DiagnosticSignWarn", text = "" },
|
||||
{ name = "DiagnosticSignHint", text = "" },
|
||||
{ name = "DiagnosticSignInfo", text = "" },
|
||||
}
|
||||
|
||||
for _, sign in ipairs(signs) do
|
||||
vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" })
|
||||
end
|
||||
|
||||
-- set the style of lsp info
|
||||
local config = {
|
||||
-- disable virtual text
|
||||
-- the message show after the current line.
|
||||
virtual_text = {
|
||||
prefix = '●',
|
||||
},
|
||||
-- show signs
|
||||
signs = {
|
||||
active = signs,
|
||||
},
|
||||
update_in_insert = true,
|
||||
underline = true,
|
||||
severity_sort = true,
|
||||
float = {
|
||||
focusable = false,
|
||||
style = "minimal",
|
||||
source = "always",
|
||||
header = "",
|
||||
prefix = "",
|
||||
},
|
||||
}
|
||||
vim.diagnostic.config(config)
|
||||
|
||||
|
||||
-- set the popup window border
|
||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
|
||||
border = "rounded",
|
||||
})
|
||||
|
||||
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {
|
||||
border = "rounded",
|
||||
})
|
||||
|
||||
-- auto open floating diagnostic message for the current line
|
||||
vim.o.updatetime = 500
|
||||
vim.api.nvim_create_autocmd("CursorHold", { callback=M.OpenDiagFloat })
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
return M
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
-- enable
|
||||
|
||||
require('lspconf.lsp')
|
|
@ -0,0 +1,98 @@
|
|||
---
|
||||
--- mason, mason-lspconfig and cmp_nvim_lsp config
|
||||
---
|
||||
-- enable lspconfig
|
||||
local lspconfig = require('lspconfig')
|
||||
-- enable mason.nvim
|
||||
local mason=require("mason")
|
||||
mason.setup()
|
||||
-- enable mason-lspconfig
|
||||
local mason_lspconfig=require("mason-lspconfig")
|
||||
mason_lspconfig.setup()
|
||||
|
||||
local attach = function ()
|
||||
-- enable lsp keymaps
|
||||
require('keymaps').attach()
|
||||
-- enable auto-open floating diagnostics, lsp info style
|
||||
require('lspconf.handlers').setup()
|
||||
-- LSP signature hint as you type
|
||||
require("lsp_signature").on_attach()
|
||||
end
|
||||
|
||||
|
||||
-- Add additional capabilities supported by nvim-cmp
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
|
||||
-- Enable all language servers installed with the additional completion capabilities offered by nvim-cmp
|
||||
local servers = mason_lspconfig.get_installed_servers()
|
||||
for _, lsp in ipairs(servers) do
|
||||
if lsp == "r_language_server" then
|
||||
lspconfig[lsp].setup {
|
||||
on_attach = attach,
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
r = {
|
||||
lsp = {
|
||||
diagnostics = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
else
|
||||
lspconfig[lsp].setup {
|
||||
on_attach = attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
-- luasnip setup
|
||||
local luasnip = require 'luasnip'
|
||||
|
||||
-- nvim-cmp setup
|
||||
local cmp = require 'cmp'
|
||||
cmp.setup {
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<CR>'] = cmp.mapping.confirm {
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
},
|
||||
['<Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
}),
|
||||
sources = {
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' },
|
||||
{ name = 'buffer' },
|
||||
{ name = 'path'},
|
||||
{ name = 'nvim_lua'},
|
||||
},
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
local fun = require("my.header_plugin.fun")
|
||||
-- this command is to print the header of csv
|
||||
vim.api.nvim_create_user_command("Headercsv", function (args)
|
||||
fun.header("csv",args.fargs[1],args.fargs[2])
|
||||
end, {
|
||||
desc = "get the header of csv file",
|
||||
nargs = "*",
|
||||
complete = "file",
|
||||
})
|
||||
|
||||
|
||||
-- this command is to print the header of tsv
|
||||
vim.api.nvim_create_user_command("Headertsv", function (args)
|
||||
fun.header("tsv",args.fargs[1],args.fargs[2])
|
||||
end, {
|
||||
desc = "get the header of tsv file",
|
||||
nargs = "*",
|
||||
complete = "file",
|
||||
})
|
||||
|
||||
|
||||
-- this command is to print the header of csv.gz
|
||||
vim.api.nvim_create_user_command("Headercsvgz", function (args)
|
||||
fun.zheader("csv",args.fargs[1],args.fargs[2])
|
||||
end, {
|
||||
desc = "get the header of csv.gz file",
|
||||
nargs = "*",
|
||||
complete = "file",
|
||||
})
|
||||
|
||||
-- this command is to print the header of tsv.gz
|
||||
vim.api.nvim_create_user_command("Headertsvgz", function (args)
|
||||
fun.zheader("tsv",args.fargs[1],args.fargs[2])
|
||||
end, {
|
||||
desc = "get the header of tsv.gz file",
|
||||
nargs = "*",
|
||||
complete = "file",
|
||||
})
|
|
@ -0,0 +1,45 @@
|
|||
|
||||
local M = {}
|
||||
|
||||
|
||||
---
|
||||
--- this function is to print the header of csv or tsv
|
||||
---
|
||||
M.header = function(f_type, file, range)
|
||||
range = range or ""
|
||||
local tbl
|
||||
|
||||
if range=="" then
|
||||
tbl={"r! head -1 ", file}
|
||||
else
|
||||
if f_type=="tsv" then
|
||||
tbl={"r! head -1 ", file, " | cut -f ", range}
|
||||
elseif f_type=="csv" then
|
||||
tbl={"r! head -1 ", file, " | cut -d, -f ", range}
|
||||
end
|
||||
end
|
||||
vim.cmd(table.concat(tbl))
|
||||
end
|
||||
|
||||
|
||||
|
||||
---
|
||||
--- this function is to print the header of csv.gz or tsv.gz
|
||||
---
|
||||
M.zheader = function(f_type, file, range)
|
||||
range = range or ""
|
||||
local tbl
|
||||
|
||||
if range=="" then
|
||||
tbl={"r! zcat ",file," | head -1 "}
|
||||
else
|
||||
if f_type=="tsv" then
|
||||
tbl={"r! zcat ",file," | head -1 ", " | cut -f ", range}
|
||||
elseif f_type=="csv" then
|
||||
tbl={"r! zcat ",file," | head -1 ", " | cut -d, -f ", range}
|
||||
end
|
||||
end
|
||||
vim.cmd(table.concat(tbl))
|
||||
end
|
||||
|
||||
return M
|
|
@ -0,0 +1 @@
|
|||
require("my.header_plugin.command")
|
|
@ -0,0 +1,20 @@
|
|||
---------------------
|
||||
--- header_plugin ---
|
||||
---------------------
|
||||
-----
|
||||
--
|
||||
-- info : provide commands to print the header of csv, tsv, csv.gz and tsv.gz files
|
||||
--
|
||||
-----
|
||||
--
|
||||
-- commands :
|
||||
--
|
||||
-- Headercsv: print csv's header
|
||||
-- Headercsvgz: print csv.gz's header
|
||||
-- Headertsv: print tsv's header
|
||||
-- Headertsvgz: print tsv.gz's header
|
||||
--
|
||||
-- usage: Headercsv path_to_csv column_range
|
||||
--
|
||||
-----
|
||||
require("my.header_plugin")
|
|
@ -0,0 +1,120 @@
|
|||
-- This file can be loaded by calling `lua require('plugins')` from your init.vim
|
||||
|
||||
-- Only required if you have packer configured as `opt`
|
||||
vim.cmd [[packadd packer.nvim]]
|
||||
|
||||
return require('packer').startup(function(use)
|
||||
-- Packer can manage itself
|
||||
use {'wbthomason/packer.nvim'}
|
||||
|
||||
-- preview colors in files
|
||||
use {'NvChad/nvim-colorizer.lua',
|
||||
opt=true,
|
||||
config=function() require("colorizer").setup{
|
||||
filetypes = { "*" },
|
||||
user_default_options = {
|
||||
RGB = true, -- #RGB hex codes
|
||||
RRGGBB = true, -- #RRGGBB hex codes
|
||||
names = true, -- "Name" codes like Blue or blue
|
||||
RRGGBBAA = true, -- #RRGGBBAA hex codes
|
||||
AARRGGBB = false, -- 0xAARRGGBB hex codes
|
||||
rgb_fn = false, -- CSS rgb() and rgba() functions
|
||||
hsl_fn = false, -- CSS hsl() and hsla() functions
|
||||
css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
|
||||
css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn
|
||||
-- Available modes for `mode`: foreground, background, virtualtext
|
||||
mode = "background", -- Set the display mode.
|
||||
-- Available methods are false / true / "normal" / "lsp" / "both"
|
||||
-- True is same as normal
|
||||
tailwind = false, -- Enable tailwind colors
|
||||
-- parsers can contain values used in |user_default_options|
|
||||
sass = { enable = false, parsers = { css }, }, -- Enable sass colors
|
||||
virtualtext = "■",
|
||||
},
|
||||
-- all the sub-options of filetypes apply to buftypes
|
||||
buftypes = {},
|
||||
}
|
||||
end}
|
||||
|
||||
-- input behaviors
|
||||
use { "windwp/nvim-autopairs", config = function() require("nvim-autopairs").setup{} end }
|
||||
use {'mg979/vim-visual-multi'}
|
||||
use { "kylechui/nvim-surround", tag = "*", config = function() require("nvim-surround").setup{} end } -- Use tag="*" for stability; omit to use `main` branch for the latest features
|
||||
|
||||
|
||||
-- markdown
|
||||
use {'iamcco/markdown-preview.nvim', run = 'cd app && yarn install', ft = {'markdown'} }
|
||||
-- use 'dhruvasagar/vim-table-mode'
|
||||
|
||||
-- insert image
|
||||
--use 'ferrine/md-img-paste.vim'
|
||||
|
||||
-- Lsp config
|
||||
use {"williamboman/mason.nvim"}
|
||||
use {"williamboman/mason-lspconfig.nvim"}
|
||||
use {"neovim/nvim-lspconfig"}
|
||||
use {'hrsh7th/nvim-cmp'}
|
||||
use {'hrsh7th/cmp-nvim-lsp'}
|
||||
use { "ray-x/lsp_signature.nvim" } -- signature hint as you type
|
||||
use {'hrsh7th/cmp-buffer'}
|
||||
use {'hrsh7th/cmp-path'}
|
||||
use {'rmagatti/goto-preview', config = function() require('goto-preview').setup {} end } --previewing definitions using floating windows.
|
||||
use {'L3MON4D3/LuaSnip'} -- Snippets plugin
|
||||
use {'saadparwaiz1/cmp_luasnip'} -- Snippets source for nvim-cmp
|
||||
use {'hrsh7th/cmp-nvim-lua', ft={"lua"}} -- plugin to provide vim.api.* completion
|
||||
|
||||
-- dress
|
||||
use {'stevearc/dressing.nvim'}
|
||||
|
||||
|
||||
-- fcitx auto-convertion
|
||||
use {'vim-scripts/fcitx.vim'}
|
||||
--use '520Matches/fcitx5.vim'
|
||||
|
||||
|
||||
-- nvim-R
|
||||
use {'jalvesaq/Nvim-R',ft = {'r'},branch="stable"}
|
||||
|
||||
-- debug
|
||||
use {"ravenxrz/DAPInstall.nvim",opt=true}
|
||||
use {"ravenxrz/nvim-dap",opt=true}
|
||||
use {"theHamsta/nvim-dap-virtual-text",opt=true}
|
||||
use {"rcarriga/nvim-dap-ui",opt=true}
|
||||
|
||||
-- fastfold
|
||||
use {'Konfekt/FastFold', ft = {'sh', 'zsh', 'bash', 'c', 'cpp', 'cmake', 'html', 'go', 'vim', 'r', 'cs','py','lua'}}
|
||||
|
||||
|
||||
-- a simple tab line
|
||||
use {'crispgm/nvim-tabline',
|
||||
config = function()
|
||||
require('tabline').setup({})
|
||||
end,
|
||||
}
|
||||
|
||||
-- open ranger in neovim
|
||||
use {'kevinhwang91/rnvimr'}
|
||||
|
||||
-- indentLine
|
||||
--use {'Yggdroot/indentLine'}
|
||||
use {"lukas-reineke/indent-blankline.nvim", config = function () require("indent_blankline").setup{ } end }
|
||||
|
||||
--fuzzy finder
|
||||
use { 'nvim-telescope/telescope.nvim',
|
||||
tag = '0.1.0',
|
||||
requires = { {'nvim-lua/plenary.nvim'} },
|
||||
config = function ()
|
||||
require("telescopeconfig")
|
||||
end
|
||||
}
|
||||
|
||||
-- ai
|
||||
use {'github/copilot.vim'}
|
||||
|
||||
-- color theme
|
||||
use {'shey-kail/one-nvim'}
|
||||
|
||||
|
||||
end)
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
local picker = require("telescopeconfig.picker")
|
||||
local preview = require("telescopeconfig.preview")
|
||||
|
||||
|
||||
require("telescope").setup {
|
||||
defaults = {
|
||||
buffer_previewer_maker = preview.new_maker,
|
||||
vimgrep_arguments = picker.vimgrep_arguments,
|
||||
},
|
||||
pickers = picker.pickers
|
||||
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
|
||||
local M = {}
|
||||
|
||||
M.pickers = {
|
||||
find_files = {
|
||||
mappings = {
|
||||
-- enable cd in telescope
|
||||
n = {
|
||||
["cd"] = function(prompt_bufnr)
|
||||
local selection = require("telescope.actions.state").get_selected_entry()
|
||||
local dir = vim.fn.fnamemodify(selection.path, ":p:h")
|
||||
require("telescope.actions").close(prompt_bufnr)
|
||||
-- Depending on what you want put `cd`, `lcd`, `tcd`
|
||||
vim.cmd(string.format("silent lcd %s", dir))
|
||||
end
|
||||
},
|
||||
},
|
||||
-- enable find hidden files (exclude .git)
|
||||
find_command = { "rg", "--files", "--hidden", "--glob", "!.git/*" },
|
||||
},
|
||||
}
|
||||
M.vimgrep_arguments = {
|
||||
"rg",
|
||||
"--color=never",
|
||||
"--no-heading",
|
||||
"--with-filename",
|
||||
"--line-number",
|
||||
"--column",
|
||||
"--smart-case",
|
||||
"--trim" -- To trim the indentation at the beginning of presented line in the result window
|
||||
}
|
||||
|
||||
return M
|
|
@ -0,0 +1,33 @@
|
|||
local previewers = require("telescope.previewers")
|
||||
|
||||
|
||||
-- Disable highlighting for these file. Put all filetypes that slow you down in this array.
|
||||
local _bad = { ".*%.csv", ".*%.txt", ".*%.bed", ".*%.fa", ".*%.fasta", ".*%.fastq", ".*%.fq", ".*%.sam"}
|
||||
local bad_files = function(filepath)
|
||||
for _, v in ipairs(_bad) do
|
||||
if filepath:match(v) then
|
||||
return false
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
local M = {}
|
||||
M.new_maker = function(filepath, bufnr, opts)
|
||||
opts = opts or {}
|
||||
|
||||
filepath = vim.fn.expand(filepath)
|
||||
vim.loop.fs_stat(filepath, function(_, stat)
|
||||
-- if file size is larger than 100000, it will disable previewer for this file
|
||||
if not stat then return end
|
||||
if stat.size > 100000 then
|
||||
return
|
||||
-- if file size is less than 100000, previewer will work normally. if the type of these file is in the list of _bad, highlighting will disable for them.
|
||||
else if opts.use_ft_detect == nil then opts.use_ft_detect = true end
|
||||
opts.use_ft_detect = opts.use_ft_detect == false and false or bad_files(filepath)
|
||||
previewers.buffer_previewer_maker(filepath, bufnr, opts)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
return M
|
|
@ -0,0 +1,329 @@
|
|||
-- 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()
|
||||
|
||||
_G._packer = _G._packer or {}
|
||||
_G._packer.inside_compile = true
|
||||
|
||||
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
|
||||
if threshold then
|
||||
table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)')
|
||||
end
|
||||
|
||||
_G._packer.profile_output = results
|
||||
end
|
||||
|
||||
time([[Luarocks path setup]], true)
|
||||
local package_path_str = "/home/shey/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/shey/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/shey/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/shey/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
|
||||
local install_cpath_pattern = "/home/shey/.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
|
||||
|
||||
time([[Luarocks path setup]], false)
|
||||
time([[try_loadstring definition]], true)
|
||||
local function try_loadstring(s, component, name)
|
||||
local success, result = pcall(loadstring(s), name, _G.packer_plugins[name])
|
||||
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 = {
|
||||
["DAPInstall.nvim"] = {
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/opt/DAPInstall.nvim",
|
||||
url = "https://github.com/ravenxrz/DAPInstall.nvim"
|
||||
},
|
||||
FastFold = {
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
only_cond = false,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/opt/FastFold",
|
||||
url = "https://github.com/Konfekt/FastFold"
|
||||
},
|
||||
LuaSnip = {
|
||||
loaded = true,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/start/LuaSnip",
|
||||
url = "https://github.com/L3MON4D3/LuaSnip"
|
||||
},
|
||||
["Nvim-R"] = {
|
||||
loaded = false,
|
||||
needs_bufread = true,
|
||||
only_cond = false,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/opt/Nvim-R",
|
||||
url = "https://github.com/jalvesaq/Nvim-R"
|
||||
},
|
||||
["cmp-buffer"] = {
|
||||
loaded = true,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/start/cmp-buffer",
|
||||
url = "https://github.com/hrsh7th/cmp-buffer"
|
||||
},
|
||||
["cmp-nvim-lsp"] = {
|
||||
loaded = true,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
|
||||
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
|
||||
},
|
||||
["cmp-nvim-lua"] = {
|
||||
after_files = { "/home/shey/.local/share/nvim/site/pack/packer/opt/cmp-nvim-lua/after/plugin/cmp_nvim_lua.lua" },
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
only_cond = false,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/opt/cmp-nvim-lua",
|
||||
url = "https://github.com/hrsh7th/cmp-nvim-lua"
|
||||
},
|
||||
["cmp-path"] = {
|
||||
loaded = true,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/start/cmp-path",
|
||||
url = "https://github.com/hrsh7th/cmp-path"
|
||||
},
|
||||
cmp_luasnip = {
|
||||
loaded = true,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/start/cmp_luasnip",
|
||||
url = "https://github.com/saadparwaiz1/cmp_luasnip"
|
||||
},
|
||||
["copilot.vim"] = {
|
||||
loaded = true,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/start/copilot.vim",
|
||||
url = "https://github.com/github/copilot.vim"
|
||||
},
|
||||
["dressing.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/start/dressing.nvim",
|
||||
url = "https://github.com/stevearc/dressing.nvim"
|
||||
},
|
||||
["fcitx.vim"] = {
|
||||
loaded = true,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/start/fcitx.vim",
|
||||
url = "https://github.com/vim-scripts/fcitx.vim"
|
||||
},
|
||||
["goto-preview"] = {
|
||||
config = { "\27LJ\2\n>\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\17goto-preview\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/start/goto-preview",
|
||||
url = "https://github.com/rmagatti/goto-preview"
|
||||
},
|
||||
["indent-blankline.nvim"] = {
|
||||
config = { "\27LJ\2\nB\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\21indent_blankline\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/start/indent-blankline.nvim",
|
||||
url = "https://github.com/lukas-reineke/indent-blankline.nvim"
|
||||
},
|
||||
["lsp_signature.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/start/lsp_signature.nvim",
|
||||
url = "https://github.com/ray-x/lsp_signature.nvim"
|
||||
},
|
||||
["markdown-preview.nvim"] = {
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
only_cond = false,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/opt/markdown-preview.nvim",
|
||||
url = "https://github.com/iamcco/markdown-preview.nvim"
|
||||
},
|
||||
["mason-lspconfig.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim",
|
||||
url = "https://github.com/williamboman/mason-lspconfig.nvim"
|
||||
},
|
||||
["mason.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/start/mason.nvim",
|
||||
url = "https://github.com/williamboman/mason.nvim"
|
||||
},
|
||||
["nvim-autopairs"] = {
|
||||
config = { "\27LJ\2\n@\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\19nvim-autopairs\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/start/nvim-autopairs",
|
||||
url = "https://github.com/windwp/nvim-autopairs"
|
||||
},
|
||||
["nvim-cmp"] = {
|
||||
loaded = true,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/start/nvim-cmp",
|
||||
url = "https://github.com/hrsh7th/nvim-cmp"
|
||||
},
|
||||
["nvim-colorizer.lua"] = {
|
||||
config = { "\27LJ\2\nª\2\0\0\a\0\r\0\0196\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\4\0005\3\3\0=\3\5\0025\3\6\0005\4\a\0004\5\3\0006\6\b\0>\6\1\5=\5\t\4=\4\n\3=\3\v\0024\3\0\0=\3\f\2B\0\2\1K\0\1\0\rbuftypes\25user_default_options\tsass\fparsers\bcss\1\0\1\venable\1\1\0\f\vhsl_fn\1\vrgb_fn\1\rAARRGGBB\1\rRRGGBBAA\2\nnames\2\vRRGGBB\2\bRGB\2\tmode\15background\16virtualtext\bâ– \rtailwind\1\vcss_fn\1\bcss\1\14filetypes\1\0\0\1\2\0\0\6*\nsetup\14colorizer\frequire\0" },
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/opt/nvim-colorizer.lua",
|
||||
url = "https://github.com/NvChad/nvim-colorizer.lua"
|
||||
},
|
||||
["nvim-dap"] = {
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/opt/nvim-dap",
|
||||
url = "https://github.com/ravenxrz/nvim-dap"
|
||||
},
|
||||
["nvim-dap-ui"] = {
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/opt/nvim-dap-ui",
|
||||
url = "https://github.com/rcarriga/nvim-dap-ui"
|
||||
},
|
||||
["nvim-dap-virtual-text"] = {
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/opt/nvim-dap-virtual-text",
|
||||
url = "https://github.com/theHamsta/nvim-dap-virtual-text"
|
||||
},
|
||||
["nvim-lspconfig"] = {
|
||||
loaded = true,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
|
||||
url = "https://github.com/neovim/nvim-lspconfig"
|
||||
},
|
||||
["nvim-surround"] = {
|
||||
config = { "\27LJ\2\n?\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\18nvim-surround\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/start/nvim-surround",
|
||||
url = "https://github.com/kylechui/nvim-surround"
|
||||
},
|
||||
["nvim-tabline"] = {
|
||||
config = { "\27LJ\2\n9\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\ftabline\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/start/nvim-tabline",
|
||||
url = "https://github.com/crispgm/nvim-tabline"
|
||||
},
|
||||
["one-nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/start/one-nvim",
|
||||
url = "https://github.com/shey-kail/one-nvim"
|
||||
},
|
||||
["packer.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/start/packer.nvim",
|
||||
url = "https://github.com/wbthomason/packer.nvim"
|
||||
},
|
||||
["plenary.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/start/plenary.nvim",
|
||||
url = "https://github.com/nvim-lua/plenary.nvim"
|
||||
},
|
||||
rnvimr = {
|
||||
loaded = true,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/start/rnvimr",
|
||||
url = "https://github.com/kevinhwang91/rnvimr"
|
||||
},
|
||||
["telescope.nvim"] = {
|
||||
config = { "\27LJ\2\n/\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\20telescopeconfig\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/start/telescope.nvim",
|
||||
url = "https://github.com/nvim-telescope/telescope.nvim"
|
||||
},
|
||||
["vim-visual-multi"] = {
|
||||
loaded = true,
|
||||
path = "/home/shey/.local/share/nvim/site/pack/packer/start/vim-visual-multi",
|
||||
url = "https://github.com/mg979/vim-visual-multi"
|
||||
}
|
||||
}
|
||||
|
||||
time([[Defining packer_plugins]], false)
|
||||
-- Config for: goto-preview
|
||||
time([[Config for goto-preview]], true)
|
||||
try_loadstring("\27LJ\2\n>\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\17goto-preview\frequire\0", "config", "goto-preview")
|
||||
time([[Config for goto-preview]], false)
|
||||
-- Config for: telescope.nvim
|
||||
time([[Config for telescope.nvim]], true)
|
||||
try_loadstring("\27LJ\2\n/\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\20telescopeconfig\frequire\0", "config", "telescope.nvim")
|
||||
time([[Config for telescope.nvim]], false)
|
||||
-- Config for: nvim-autopairs
|
||||
time([[Config for nvim-autopairs]], true)
|
||||
try_loadstring("\27LJ\2\n@\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\19nvim-autopairs\frequire\0", "config", "nvim-autopairs")
|
||||
time([[Config for nvim-autopairs]], false)
|
||||
-- Config for: nvim-surround
|
||||
time([[Config for nvim-surround]], true)
|
||||
try_loadstring("\27LJ\2\n?\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\18nvim-surround\frequire\0", "config", "nvim-surround")
|
||||
time([[Config for nvim-surround]], false)
|
||||
-- Config for: nvim-tabline
|
||||
time([[Config for nvim-tabline]], true)
|
||||
try_loadstring("\27LJ\2\n9\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\ftabline\frequire\0", "config", "nvim-tabline")
|
||||
time([[Config for nvim-tabline]], false)
|
||||
-- Config for: indent-blankline.nvim
|
||||
time([[Config for indent-blankline.nvim]], true)
|
||||
try_loadstring("\27LJ\2\nB\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\21indent_blankline\frequire\0", "config", "indent-blankline.nvim")
|
||||
time([[Config for indent-blankline.nvim]], false)
|
||||
vim.cmd [[augroup packer_load_aucmds]]
|
||||
vim.cmd [[au!]]
|
||||
-- Filetype lazy-loads
|
||||
time([[Defining lazy-load filetype autocommands]], true)
|
||||
vim.cmd [[au FileType markdown ++once lua require("packer.load")({'markdown-preview.nvim'}, { ft = "markdown" }, _G.packer_plugins)]]
|
||||
vim.cmd [[au FileType r ++once lua require("packer.load")({'FastFold', 'Nvim-R'}, { ft = "r" }, _G.packer_plugins)]]
|
||||
vim.cmd [[au FileType sh ++once lua require("packer.load")({'FastFold'}, { ft = "sh" }, _G.packer_plugins)]]
|
||||
vim.cmd [[au FileType lua ++once lua require("packer.load")({'cmp-nvim-lua', 'FastFold'}, { ft = "lua" }, _G.packer_plugins)]]
|
||||
vim.cmd [[au FileType vim ++once lua require("packer.load")({'FastFold'}, { ft = "vim" }, _G.packer_plugins)]]
|
||||
vim.cmd [[au FileType html ++once lua require("packer.load")({'FastFold'}, { ft = "html" }, _G.packer_plugins)]]
|
||||
vim.cmd [[au FileType go ++once lua require("packer.load")({'FastFold'}, { ft = "go" }, _G.packer_plugins)]]
|
||||
vim.cmd [[au FileType zsh ++once lua require("packer.load")({'FastFold'}, { ft = "zsh" }, _G.packer_plugins)]]
|
||||
vim.cmd [[au FileType bash ++once lua require("packer.load")({'FastFold'}, { ft = "bash" }, _G.packer_plugins)]]
|
||||
vim.cmd [[au FileType cpp ++once lua require("packer.load")({'FastFold'}, { ft = "cpp" }, _G.packer_plugins)]]
|
||||
vim.cmd [[au FileType cmake ++once lua require("packer.load")({'FastFold'}, { ft = "cmake" }, _G.packer_plugins)]]
|
||||
vim.cmd [[au FileType c ++once lua require("packer.load")({'FastFold'}, { ft = "c" }, _G.packer_plugins)]]
|
||||
vim.cmd [[au FileType cs ++once lua require("packer.load")({'FastFold'}, { ft = "cs" }, _G.packer_plugins)]]
|
||||
vim.cmd [[au FileType py ++once lua require("packer.load")({'FastFold'}, { ft = "py" }, _G.packer_plugins)]]
|
||||
time([[Defining lazy-load filetype autocommands]], false)
|
||||
vim.cmd("augroup END")
|
||||
vim.cmd [[augroup filetypedetect]]
|
||||
time([[Sourcing ftdetect script at: /home/shey/.local/share/nvim/site/pack/packer/opt/Nvim-R/ftdetect/r.vim]], true)
|
||||
vim.cmd [[source /home/shey/.local/share/nvim/site/pack/packer/opt/Nvim-R/ftdetect/r.vim]]
|
||||
time([[Sourcing ftdetect script at: /home/shey/.local/share/nvim/site/pack/packer/opt/Nvim-R/ftdetect/r.vim]], false)
|
||||
vim.cmd("augroup END")
|
||||
|
||||
_G._packer.inside_compile = false
|
||||
if _G._packer.needs_bufread == true then
|
||||
vim.cmd("doautocmd BufRead")
|
||||
end
|
||||
_G._packer.needs_bufread = false
|
||||
|
||||
if should_profile then save_profiles() end
|
||||
|
||||
end)
|
||||
|
||||
if not no_errors then
|
||||
error_msg = error_msg:gsub('"', '\\"')
|
||||
vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
|
||||
end
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"adapters": {
|
||||
"debugpy": {
|
||||
"command": [
|
||||
"python3",
|
||||
"-m",
|
||||
"debugpy.adapter"
|
||||
],
|
||||
"name": "debugpy"
|
||||
}
|
||||
},
|
||||
"configurations": {
|
||||
"run - debugpy": {
|
||||
"adapter": "debugpy",
|
||||
"configuration": {
|
||||
"python": "/usr/bin/python3",
|
||||
"request": "launch",
|
||||
"type": "python",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"program": "${file}",
|
||||
"stopOnEntry": true,
|
||||
"args": [ "*${args:--update-gadget-config}" ]
|
||||
},
|
||||
"breakpoints": {
|
||||
"exception": {
|
||||
"raised": "N",
|
||||
"uncaught": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"configurations": {
|
||||
"cpp:launch": {
|
||||
"adapter": "vscode-cpptools",
|
||||
"configuration": {
|
||||
"name": "cpp",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${fileDirname}/a.out",
|
||||
"args": ["*${ProgramArgs}"],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"stopAtEntry": true,
|
||||
"MIMode": "gdb",
|
||||
"logging": {
|
||||
"engineLogging": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"configurations": {
|
||||
"cpp:launch": {
|
||||
"adapter": "CodeLLDB",
|
||||
"configuration": {
|
||||
"name": "rust",
|
||||
"type": "rustdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceRoot}/target/debug/list",
|
||||
"args": ["*${ProgramArgs}"],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"stopAtEntry": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue