mirror of
https://github.com/d0zingcat/dotfiles.git
synced 2026-05-20 07:26:51 +00:00
mig packer to lazy and archive
Signed-off-by: d0zingcat <leewtang@gmail.com>
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
require('gitsigns').setup({
|
||||
signs = {
|
||||
add = { hl = 'GitSignsAdd', text = '┋', numhl = 'GitSignsAddNr', linehl = 'GitSignsAddLn' },
|
||||
change = { hl = 'GitSignsChange', text = '┋', numhl = 'GitSignsChangeNr', linehl = 'GitSignsChangeLn' },
|
||||
delete = { hl = 'GitSignsDelete', text = '⇉', numhl = 'GitSignsDeleteNr', linehl = 'GitSignsDeleteLn' },
|
||||
topdelete = { hl = 'GitSignsDelete', text = '⇊', numhl = 'GitSignsDeleteNr', linehl = 'GitSignsDeleteLn' },
|
||||
changedelete = { hl = 'GitSignsChange', text = '~', numhl = 'GitSignsChangeNr', linehl = 'GitSignsChangeLn' },
|
||||
},
|
||||
keymaps = {
|
||||
-- Default keymap options
|
||||
noremap = true,
|
||||
|
||||
['n ]c'] = { expr = true, "&diff ? ']c' : '<cmd>lua require\"gitsigns.actions\".next_hunk()<CR>'" },
|
||||
['n [c'] = { expr = true, "&diff ? '[c' : '<cmd>lua require\"gitsigns.actions\".prev_hunk()<CR>'" },
|
||||
},
|
||||
word_diff = false,
|
||||
current_line_blame = true,
|
||||
linehl = true,
|
||||
numhl = true,
|
||||
sign_priority = 6,
|
||||
count_chars = {
|
||||
[1] = '1', -- '₁',
|
||||
[2] = '2', -- '₂',
|
||||
[3] = '3', -- '₃',
|
||||
[4] = '4', -- '₄',
|
||||
[5] = '5', -- '₅',
|
||||
[6] = '6', -- '₆',
|
||||
[7] = '7', -- '₇',
|
||||
[8] = '8', -- '₈',
|
||||
[9] = '9', -- '₉',
|
||||
['+'] = '', -- '₊',
|
||||
},
|
||||
})
|
||||
@@ -1,7 +0,0 @@
|
||||
require('indent_blankline').setup({
|
||||
char = '|',
|
||||
buftype_exclude = { 'terminal' },
|
||||
show_trailing_blankline_indent = false,
|
||||
-- show_current_context = true,
|
||||
use_treesitter = true,
|
||||
})
|
||||
@@ -1,101 +0,0 @@
|
||||
local utils = require('lsp-setup.utils')
|
||||
local nvim_lsp = require('lspconfig')
|
||||
local mappings = {
|
||||
-- Example mappings for telescope pickers
|
||||
gd = 'lua require"telescope.builtin".lsp_definitions({jump_type="vsplit"})',
|
||||
gi = 'lua require"telescope.builtin".lsp_implementations({jump_type="vsplit"})',
|
||||
gr = 'lua require"telescope.builtin".lsp_references({jump_type="vsplit"})',
|
||||
go = 'lua require"telescope.builtin".lsp_document_symbols({jump_type="vsplit"})',
|
||||
['<space>f'] = 'lua vim.lsp.buf.format({async=true})',
|
||||
}
|
||||
|
||||
require("neodev").setup({
|
||||
-- add any options here, or leave empty to use the default settings
|
||||
})
|
||||
|
||||
local servers = {
|
||||
lua_ls = {},
|
||||
bashls = {},
|
||||
helm_ls = {},
|
||||
yamlls = {
|
||||
filetypes = { 'yaml', 'yml' },
|
||||
settings = {
|
||||
yaml = {
|
||||
schemas = {
|
||||
['https://json.schemastore.org/github-workflow.json'] = '/.github/workflows/*',
|
||||
['https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v2.0/schema.json'] = {
|
||||
'/*swagger.yaml',
|
||||
'/*swagger.yml',
|
||||
},
|
||||
Kubernetes = {
|
||||
'/*ing.yaml',
|
||||
'/*deploy.yaml',
|
||||
'/*sts.yaml',
|
||||
'/*cm.yaml',
|
||||
'/*secret.yaml',
|
||||
'/*kustomization.yaml',
|
||||
'/*svc.yaml',
|
||||
},
|
||||
--['https://raw.githubusercontent.com/instrumenta/kubernetes-json-schema/master/v1.18.0-standalone-strict/all.json'] = '/*.k8s.yaml',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
eslint = {},
|
||||
jsonls = {},
|
||||
clangd = {},
|
||||
gopls = {
|
||||
settings = {
|
||||
gopls = {
|
||||
gofumpt = true,
|
||||
usePlaceholders = true,
|
||||
staticcheck = true,
|
||||
codelenses = {
|
||||
gc_details = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
tsserver = {},
|
||||
prosemd_lsp = {},
|
||||
|
||||
pylsp = {},
|
||||
rust_analyzer = {
|
||||
settings = {
|
||||
['rust-analyzer'] = {
|
||||
cargo = {
|
||||
loadOutDirsFromCheck = true,
|
||||
},
|
||||
procMacro = {
|
||||
enable = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
terraformls = {},
|
||||
-- beancount = {
|
||||
-- -- filetypes = { 'beancount', 'bean' },
|
||||
-- cmd = { "beancount-language-server", "--stdio", },
|
||||
-- init_options = {
|
||||
-- journalFile = ""
|
||||
-- },
|
||||
-- filetypes = { "beancount", "bean" },
|
||||
-- root_dir = nvim_lsp.util.root_pattern("main.bean"),
|
||||
-- single_file_support = true,
|
||||
-- }
|
||||
}
|
||||
|
||||
local settings = {
|
||||
default_mappings = true,
|
||||
mappings = mappings,
|
||||
servers = servers,
|
||||
}
|
||||
|
||||
require('lsp-setup').setup(settings)
|
||||
|
||||
-- require('lsp_signature').setup({})
|
||||
require('lsp-colors').setup({})
|
||||
|
||||
local border = { '╭', '─', '╮', '│', '╯', '─', '╰', '│' }
|
||||
vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(vim.lsp.handlers.hover, { border = border })
|
||||
vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = border })
|
||||
@@ -1,5 +0,0 @@
|
||||
require('lsp_lines').setup()
|
||||
|
||||
vim.diagnostic.config({
|
||||
virtual_text = false,
|
||||
})
|
||||
@@ -1,106 +0,0 @@
|
||||
require('lualine').setup({
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'auto',
|
||||
component_separators = { left = '', right = '' },
|
||||
section_separators = { left = '', right = '' },
|
||||
disabled_filetypes = {},
|
||||
always_divide_middle = true,
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { 'mode' },
|
||||
lualine_b = { 'branch', 'diff', 'diagnostics' },
|
||||
lualine_c = { 'filename', 'lsp_progress' },
|
||||
lualine_x = { 'encoding', 'fileformat', 'filetype' },
|
||||
lualine_y = { 'progress' },
|
||||
lualine_z = { 'location' },
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = { 'filename' },
|
||||
lualine_x = { 'location' },
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
},
|
||||
tabline = {},
|
||||
extensions = {},
|
||||
})
|
||||
|
||||
local colors = {
|
||||
yellow = '#ECBE7B',
|
||||
cyan = '#008080',
|
||||
darkblue = '#081633',
|
||||
green = '#98be65',
|
||||
orange = '#FF8800',
|
||||
violet = '#a9a1e1',
|
||||
magenta = '#c678dd',
|
||||
blue = '#51afef',
|
||||
red = '#ec5f67',
|
||||
}
|
||||
|
||||
local config = {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'gruvbox',
|
||||
component_separators = { '', '' },
|
||||
section_separators = { '', '' },
|
||||
disabled_filetypes = {},
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { 'mode' },
|
||||
lualine_b = { 'filename' },
|
||||
lualine_c = {},
|
||||
lualine_x = {},
|
||||
lualine_y = { 'encoding', 'fileformat', 'filetype' },
|
||||
lualine_z = { 'branch' },
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = { 'filename' },
|
||||
lualine_x = { 'location' },
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
},
|
||||
tabline = {},
|
||||
extensions = {},
|
||||
}
|
||||
|
||||
-- Inserts a component in lualine_c at left section
|
||||
local function ins_left(component)
|
||||
table.insert(config.sections.lualine_c, component)
|
||||
end
|
||||
|
||||
-- Inserts a component in lualine_x ot right section
|
||||
local function ins_right(component)
|
||||
table.insert(config.sections.lualine_x, component)
|
||||
end
|
||||
|
||||
--ins_left {
|
||||
--'lsp_progress',
|
||||
--display_components = { 'lsp_client_name', { 'title', 'percentage', 'message' }},
|
||||
---- With spinner
|
||||
---- display_components = { 'lsp_client_name', 'spinner', { 'title', 'percentage', 'message' }},
|
||||
--colors = {
|
||||
--percentage = colors.cyan,
|
||||
--title = colors.cyan,
|
||||
--message = colors.cyan,
|
||||
--spinner = colors.cyan,
|
||||
--lsp_client_name = colors.magenta,
|
||||
--use = true,
|
||||
--},
|
||||
--separators = {
|
||||
--component = ' ',
|
||||
--progress = ' | ',
|
||||
--message = { pre = '(', post = ')'},
|
||||
--percentage = { pre = '', post = '%% ' },
|
||||
--title = { pre = '', post = ': ' },
|
||||
--lsp_client_name = { pre = '[', post = ']' },
|
||||
--spinner = { pre = '', post = '' },
|
||||
--message = { commenced = 'In Progress', completed = 'Completed' },
|
||||
--},
|
||||
--display_components = { 'lsp_client_name', 'spinner', { 'title', 'percentage', 'message' } },
|
||||
--timer = { progress_enddelay = 500, spinner = 1000, lsp_client_name_enddelay = 1000 },
|
||||
--spinner_symbols = { '🌑 ', '🌒 ', '🌓 ', '🌔 ', '🌕 ', '🌖 ', '🌗 ', '🌘 ' },
|
||||
--}
|
||||
@@ -1,25 +0,0 @@
|
||||
local g = vim.g
|
||||
|
||||
local border_chars = {
|
||||
TOP_LEFT = '╭',
|
||||
TOP_RIGHT = '╮',
|
||||
MID_HORIZONTAL = '─',
|
||||
MID_VERTICAL = '│',
|
||||
BOTTOM_LEFT = '╰',
|
||||
BOTTOM_RIGHT = '╯',
|
||||
}
|
||||
|
||||
g.lsp_utils_location_opts = {
|
||||
mode = 'split',
|
||||
preview = {
|
||||
title = 'Location Preview',
|
||||
border = true,
|
||||
border_chars = border_chars,
|
||||
},
|
||||
keymaps = {
|
||||
n = {
|
||||
['<C-n>'] = 'j',
|
||||
['<C-p>'] = 'k',
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,104 +0,0 @@
|
||||
local function open_nvim_tree(data)
|
||||
-- buffer is a real file on the disk
|
||||
local real_file = vim.fn.filereadable(data.file) == 1
|
||||
|
||||
-- buffer is a [No Name]
|
||||
local no_name = data.file == "" and vim.bo[data.buf].buftype == ""
|
||||
|
||||
-- buffer is a directory
|
||||
local directory = vim.fn.isdirectory(data.file) == 1
|
||||
|
||||
if directory then
|
||||
-- create a new, empty buffer
|
||||
vim.cmd.enew()
|
||||
|
||||
-- wipe the directory buffer
|
||||
vim.cmd.bw(data.buf)
|
||||
|
||||
-- change to the directory
|
||||
vim.cmd.cd(data.file)
|
||||
|
||||
-- open the tree
|
||||
require("nvim-tree.api").tree.open()
|
||||
end
|
||||
|
||||
if real_file or no_name then
|
||||
-- open the tree, find the file but don't focus it
|
||||
require("nvim-tree.api").tree.toggle({ focus = false, find_file = true, })
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--- autocmd with callbacks
|
||||
vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree })
|
||||
|
||||
vim.api.nvim_create_autocmd("BufEnter", {
|
||||
group = vim.api.nvim_create_augroup("NvimTreeClose", { clear = true }),
|
||||
pattern = "NvimTree_*",
|
||||
callback = function()
|
||||
local layout = vim.api.nvim_call_function("winlayout", {})
|
||||
if layout[1] == "leaf" and
|
||||
vim.api.nvim_buf_get_option(vim.api.nvim_win_get_buf(layout[2]), "filetype") == "NvimTree" and
|
||||
layout[3] == nil then vim.cmd("confirm quit") end
|
||||
end
|
||||
})
|
||||
|
||||
local function on_attach(bufnr)
|
||||
local api = require('nvim-tree.api')
|
||||
|
||||
local function opts(desc)
|
||||
return { desc = 'nvim-tree: ' .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
|
||||
end
|
||||
|
||||
api.config.mappings.default_on_attach(bufnr)
|
||||
-- Mappings migrated from view.mappings.list
|
||||
-- You will need to insert "your code goes here" for any mappings with a custom action_cb
|
||||
vim.keymap.set('n', '<C-v>', api.node.open.vertical, opts('Open: Vertical Split'))
|
||||
vim.keymap.set('n', '<C-s>', api.node.open.horizontal, opts('Open: Horizontal Split'))
|
||||
vim.keymap.set('n', 'v', api.node.open.vertical, opts('Open: Vertical Split'))
|
||||
vim.keymap.set('n', 's', api.node.open.horizontal, opts('Open: Horizontal Split'))
|
||||
vim.keymap.set('n', 'P', function()
|
||||
local node = api.tree.get_node_under_cursor()
|
||||
print(node.absolute_path)
|
||||
end, opts('Print Node Path'))
|
||||
end
|
||||
|
||||
require('nvim-tree').setup({
|
||||
view = {
|
||||
width = 35,
|
||||
side = 'left',
|
||||
},
|
||||
renderer = {
|
||||
highlight_opened_files = '1',
|
||||
},
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
icons = {
|
||||
error = '',
|
||||
warning = '',
|
||||
info = '',
|
||||
hint = '',
|
||||
},
|
||||
},
|
||||
update_focused_file = {
|
||||
enable = true,
|
||||
update_root = true,
|
||||
},
|
||||
filters = {
|
||||
custom = {
|
||||
'.git$'
|
||||
},
|
||||
},
|
||||
hijack_netrw = true,
|
||||
update_cwd = true,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
-- map('n', '<leader>te', ':NvimTreeToggle<CR>')
|
||||
|
||||
-- vim.cmd([[
|
||||
-- autocmd BufEnter * ++nested if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif
|
||||
-- augroup nvimtree
|
||||
-- autocmd VimEnter * lua require('nvim-tree').toggle(false, true)
|
||||
-- augroup END
|
||||
-- ]])
|
||||
@@ -1,18 +0,0 @@
|
||||
local cmd = vim.cmd
|
||||
local g = vim.g
|
||||
local map = require('utils').map
|
||||
|
||||
-- vim-bookmarks
|
||||
require('telescope').load_extension('vim_bookmarks')
|
||||
|
||||
g['bookmark_sign'] = '⚑'
|
||||
g['bookmark_highlight_lines'] = 1
|
||||
g['bookmark_no_default_key_mappings'] = 1
|
||||
|
||||
cmd([[highlight BookmarkSign ctermbg=NONE ctermfg=160]])
|
||||
cmd([[highlight BookmarkLine ctermbg=194 ctermfg=NONE]])
|
||||
|
||||
map('n', 'mm', ':BookmarkToggle<CR>')
|
||||
map('n', 'mA', ':Telescope vim_bookmarks all<CR>')
|
||||
map('n', 'ma', ':Telescope vim_bookmarks current_file<CR>')
|
||||
-- map("n", "ma", ":BookmarkShowAll<CR>")
|
||||
@@ -1,45 +0,0 @@
|
||||
local fn = vim.fn
|
||||
|
||||
-- nvim-cmp
|
||||
local cmp = require('cmp')
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
fn['vsnip#anonymous'](args.body)
|
||||
end,
|
||||
},
|
||||
formatting = {
|
||||
format = function(entry, vim_item)
|
||||
-- set a name for each source
|
||||
vim_item.menu = ({
|
||||
buffer = '[Buf]',
|
||||
nvim_lsp = '[LSP]',
|
||||
luasnip = '[Snip]',
|
||||
nvim_lua = '[Lua]',
|
||||
latex_symbols = '[Latex]',
|
||||
})[entry.source.name]
|
||||
return vim_item
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
-- ['<C-e>'] = cmp.mapping.complete(),
|
||||
--["<C-e>"] = cmp.mapping.close(),
|
||||
['<C-e>'] = function(fallback)
|
||||
fallback()
|
||||
end,
|
||||
-- ['<CR>'] = cmp.mapping.confirm({
|
||||
-- behavior = cmp.ConfirmBehavior.Replace,
|
||||
-- select = true,
|
||||
-- }),
|
||||
['<C-y>'] = cmp.mapping.confirm({ select = true }),
|
||||
-- ['<C-n>'] = cmp.mapping.select_next_item(),
|
||||
-- ['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||
--},
|
||||
}),
|
||||
sources = {
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'buffer' },
|
||||
},
|
||||
})
|
||||
@@ -1,14 +0,0 @@
|
||||
local g = vim.g
|
||||
local map = require('utils').map
|
||||
|
||||
-- floaterm
|
||||
g['floaterm_keymap_new'] = '<F7>'
|
||||
g['floaterm_keymap_next'] = '<F8>'
|
||||
g['floaterm_keymap_prev'] = '<F9>'
|
||||
g['floaterm_keymap_toggle'] = '<F10>'
|
||||
g['floaterm_position'] = 'bottomright'
|
||||
map('t', '<Esc>', '<c-\\><c-n>')
|
||||
map('n', '<leader>t', 'V:FloatermSend<CR>:FloatermToggle<CR>')
|
||||
map('v', '<leader>t', ':FloatermSend<CR>:FloatermToggle<CR>')
|
||||
map('n', '<leader>r', 'V:FloatermSend<CR>:FloatermToggle<CR>')
|
||||
map('v', '<leader>r', ':FloatermSend<CR>:FloatermToggle<CR>')
|
||||
@@ -1,15 +0,0 @@
|
||||
local map = require('utils').map
|
||||
|
||||
-- hopworld
|
||||
require('hop').setup({ keys = 'etovxqpdygfblzhckisuran' })
|
||||
|
||||
map('n', '<leader>fw', '<cmd>HopWord<cr>')
|
||||
map('n', '<leader>s', '<cmd>HopChar1<cr>')
|
||||
map('n', '<leader>h', '<cmd>HopWordBC<cr>')
|
||||
map('n', '<leader>j', '<cmd>HopLineStartAC<cr>')
|
||||
map('n', '<leader>k', '<cmd>HopLineStartBC<cr>')
|
||||
map('n', '<leader>l', '<cmd>HopWordAC<cr>')
|
||||
map('v', '<leader>h', '<cmd>HopWordBC<cr>')
|
||||
map('v', '<leader>j', '<cmd>HopLineStartAC<cr>')
|
||||
map('v', '<leader>k', '<cmd>HopLineStartBC<cr>')
|
||||
map('v', '<leader>l', '<cmd>HopWordAC<cr>')
|
||||
@@ -1,37 +0,0 @@
|
||||
local map = require('utils').map
|
||||
|
||||
-- telescope
|
||||
local actions = require('telescope.actions')
|
||||
require('telescope').setup({
|
||||
defaults = {
|
||||
layout_config = {
|
||||
horizontal = {
|
||||
width = 0.75,
|
||||
height = 0.6,
|
||||
},
|
||||
},
|
||||
mappings = {
|
||||
i = {
|
||||
['<esc>'] = actions.close,
|
||||
['<C-k>'] = actions.move_selection_previous,
|
||||
['<C-j>'] = actions.move_selection_next,
|
||||
['<C-l>'] = { '<Right>', type = 'command' },
|
||||
['<C-h>'] = { '<Left>', type = 'command' },
|
||||
['<C-f>'] = actions.preview_scrolling_down,
|
||||
['<C-b>'] = actions.preview_scrolling_up,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
local builtin = require('telescope.builtin')
|
||||
map('n', '<leader>ff', builtin.find_files)
|
||||
-- map('n', '<leader>fg', [[:lua require('telescope.builtin').live_grep({additional_args = {'-j8'}})<CR>]])
|
||||
map('n', '<leader>fb', builtin.buffers)
|
||||
map('n', '<leader>fg', function() builtin.live_grep({ additional_args = { '-j8' } }) end)
|
||||
map('n', '<leader>fh', builtin.help_tags)
|
||||
map('n', '<leader>;', builtin.commands)
|
||||
|
||||
-- To get fzf loaded and working with telescope, you need to call
|
||||
-- load_extension, somewhere after setup function:
|
||||
require('telescope').load_extension('fzf')
|
||||
@@ -1,51 +0,0 @@
|
||||
local ncmd = vim.api.nvim_command
|
||||
|
||||
require('nvim-treesitter.configs').setup({
|
||||
ensure_installed = { 'c', 'lua', 'rust', 'go', 'python', 'zig', 'markdown', 'solidity', 'jsonnet', 'vim',
|
||||
'javascript', 'typescript' },
|
||||
highlight = {
|
||||
enable = true,
|
||||
},
|
||||
playground = {
|
||||
enable = true,
|
||||
},
|
||||
query_linter = {
|
||||
enable = true,
|
||||
use_virtual_text = true,
|
||||
lint_events = { 'BufWrite', 'CursorHold' },
|
||||
},
|
||||
-- nvim-treesitter/nvim-treesitter-refactor
|
||||
refactor = {
|
||||
highlight_definitions = { enable = true },
|
||||
smart_rename = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
smart_rename = 'gnr',
|
||||
},
|
||||
},
|
||||
},
|
||||
indent = { enable = false },
|
||||
autopairs = { enable = true },
|
||||
rainbow = { enable = true },
|
||||
autotag = { enable = true },
|
||||
context_commentstring = { enable = true },
|
||||
-- RRethy/nvim-treesitter-endwise
|
||||
endwise = {
|
||||
enable = true,
|
||||
},
|
||||
-- andymass/vim-matchup
|
||||
matchup = {
|
||||
enable = true,
|
||||
},
|
||||
-- nvim-treesitter/nvim-treesitter-textobjects
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true,
|
||||
},
|
||||
},
|
||||
-- yioneko/nvim-yati
|
||||
yati = { enable = true },
|
||||
})
|
||||
ncmd('set foldmethod=expr')
|
||||
ncmd('set foldexpr=nvim_treesitter#foldexpr()')
|
||||
@@ -1,21 +0,0 @@
|
||||
local g = vim.g
|
||||
|
||||
-- vim-go
|
||||
-- let g:go_code_completion_enabled = 1 -- Enable Autocompletion
|
||||
--g['go_fmt_command'] = 'goimports' -- 格式化将默认的 gofmt 替换
|
||||
g['go_autodetect_gopath'] = 1
|
||||
g['go_list_type'] = 'quickfix'
|
||||
g['go_version_warning'] = 1
|
||||
g['go_highlight_types'] = 1
|
||||
g['go_highlight_fields'] = 1
|
||||
g['go_highlight_functions'] = 1
|
||||
g['go_highlight_function_calls'] = 1
|
||||
g['go_highlight_operators'] = 1
|
||||
g['go_highlight_extra_types'] = 1
|
||||
g['go_highlight_methods'] = 1
|
||||
g['go_highlight_generate_tags'] = 1
|
||||
g['godef_split'] = 2
|
||||
--g['go_fmt_command'] = 'goimports' " Run goimports along gofmt on each save
|
||||
g['go_imports_mode'] = 'goimports'
|
||||
g['go_imports_autosave'] = 0 -- do not auto import
|
||||
g['go_auto_type_info'] = 1 -- automatically get signature/type info for object under cursor
|
||||
@@ -1,15 +0,0 @@
|
||||
local g = vim.g
|
||||
local map = require('utils').map
|
||||
|
||||
map('t', '<C-]>', [[<C-\><C-n>]], { noremap = true })
|
||||
|
||||
require('toggleterm').setup({
|
||||
open_mapping = [[<C-t>]],
|
||||
size = function(term)
|
||||
if term.direction == 'horizontal' then
|
||||
return 15
|
||||
else
|
||||
return vim.o.columns * 0.3
|
||||
end
|
||||
end,
|
||||
})
|
||||
@@ -1,5 +0,0 @@
|
||||
require('trouble').setup({
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
-- refer to the configuration section below
|
||||
})
|
||||
@@ -1,4 +0,0 @@
|
||||
local map = require('utils').map
|
||||
|
||||
map('v', '<leader>yy', ':OSCYank<CR>')
|
||||
map('n', '<leader>o', '<Plug>OSCYank')
|
||||
@@ -1,15 +0,0 @@
|
||||
local api = vim.api
|
||||
|
||||
api.nvim_exec(
|
||||
[[
|
||||
" Ensure you have installed some decent font to show these pretty symbols, then you can enable icon for the kind.
|
||||
let g:vista#renderer#enable_icon = 1
|
||||
|
||||
" The default icons can't be suitable for all the filetypes, you can extend it as you wish.
|
||||
let g:vista#renderer#icons = {
|
||||
\ "function": "\uf794",
|
||||
\ "variable": "\uf71b",
|
||||
\ }
|
||||
]],
|
||||
false
|
||||
)
|
||||
Reference in New Issue
Block a user