all repos

dotfiles @ 07ee8a7f3e769acf73ed304b251e03ba02648b55

my dotfiles
36 files changed, 0 insertions(+), 906 deletions(-)
delete nvim config
Author: neoteny ss2316544@gmail.com
Committed at: 2021-11-28 22:38:08 +0200
Parent: 0aafc4d
D config/nvim/.gitignore

@@ -1,1 +0,0 @@

-/plugin
D config/nvim/Makefile

@@ -1,5 +0,0 @@

-fmt: - @stylua {lua,init.lua} - -lint: - @selene {lua,init.lua}
D config/nvim/ftplugin/go.lua

@@ -1,6 +0,0 @@

-local ok, dapi = pcall(require, "dap-install") -if not ok then - return -end - -dapi.config("go_delve", {})
D config/nvim/ftplugin/javascript.lua

@@ -1,6 +0,0 @@

-local ok, dapi = pcall(require, "dap-install") -if not ok then - return -end - -dapi.config("jsnode", {})
D config/nvim/ftplugin/lua.lua

@@ -1,6 +0,0 @@

-local ok, dapi = pcall(require, "dap-install") -if not ok then - return -end - -dapi.config("lua", {})
D config/nvim/ftplugin/python.lua

@@ -1,6 +0,0 @@

-local ok, dapi = pcall(require, "dap-install") -if not ok then - return -end - -dapi.config("python", {})
D config/nvim/init.lua

@@ -1,9 +0,0 @@

-require "options" -require "plugin" -require "keymapings" -require "disabled" -require "globals" -require "autocmd" - -vim.g.vscode_style = "dark" -vim.cmd [[colo vscode]]
D config/nvim/lua/autocmd.lua

@@ -1,1 +0,0 @@

-vim.cmd [[ autocmd BufWritePre * lua mkdir() ]]
D config/nvim/lua/disabled.lua

@@ -1,26 +0,0 @@

-local disabled_built_ins = { - "netrw", - "netrwPlugin", - "netrwSettings", - "netrwFileHandlers", - "gzip", - "zip", - "tohtml", - "man", - "zipPlugin", - "tar", - "tarPlugin", - "getscript", - "getscriptPlugin", - "vimball", - "vimballPlugin", - "2html_plugin", - "logipat", - "rrhelper", - "spellfile_plugin", - "matchit", -} - -for _, plugin in pairs(disabled_built_ins) do - vim.g["loaded_" .. plugin] = 1 -end
D config/nvim/lua/globals.lua

@@ -1,10 +0,0 @@

-function _G.term_cmd(cmd) - require("toggleterm.terminal").Terminal:new({ cmd = cmd, hidden = true }):toggle() -end - -function _G.mkdir() - local dir = vim.fn.expand "%:p:h" - if vim.fn.isdirectory(dir) == 0 then - vim.fn.mkdir(dir, "p") - end -end
D config/nvim/lua/keymapings.lua

@@ -1,78 +0,0 @@

-local u = require "utils" -local map, nmap, expr = u.map, u.nmap, u.expr - -nmap("<C-s>", "<cmd>write!<cr>") -nmap("<leader>h", "<cmd>nohlsearch<cr>") -nmap("<leader>q", "<cmd>quit!<cr>") -nmap("<leader>w", "<cmd>write!<cr>") -nmap("<leader>e", "<cmd>NvimTreeToggle<cr>") -nmap("<leader>/", "<cmd>lua require[[Comment]].toggle()<cr>") -map("v", "<leader>/", "gc") -nmap("<leader>ps", "<cmd>PackerSync<cr>") - --- Windows -for _, k in ipairs { "h", "j", "k", "l" } do - nmap(string.format("<C-%s>", k), string.format("<cmd>wincmd %s<cr>", k)) - map("t", string.format("<C-%s>", k), string.format("<C-\\><C-N><C-w>%s", k)) -end - -nmap("<C-Left>", "<cmd>vertical resize -2<cr>") -nmap("<C-Up", "<cmd>resize -1<cr>") -nmap("<C-Down>", "<cmd>resize +2<cr>") -nmap("<C-Right>", "<cmd>vertical resize +2<CR>") - --- Alternative up/down for arrows -expr("i", "<C-j>", 'pumvisible() ? "\\<down>" : "\\<C-j>"') -expr("i", "<C-k>", 'pumvisible() ? "\\<up>" : "\\<C-k>"') -expr("c", "<C-j>", 'pumvisible() ? "\\<C-n>" : "\\<C-j>"') -expr("c", "<C-k>", 'pumvisible() ? "\\<C-p>" : "\\<C-k>"') - --- Move line -map("i", "<A-j>", "<Esc>:m .+1<CR>==gi") -map("i", "<A-k>", "<Esc>:m .-2<CR>==gi") -map("v", "K", ":move '<-2<CR>gv-gv") -map("v", "J", ":move '>+1<CR>gv-gv") -nmap("<A-j>", ":m .+1<CR>==") -nmap("<A-k>", ":m .-2<CR>==") - --- Telescope -nmap("<leader>f", "<cmd>Telescope find_files<cr>") -nmap("<leader>b", "<cmd>Telescope buffers<cr>") -nmap("<leader>st", "<cmd>Telescope live_grep<cr>") -nmap("<leader>sT", "<cmd>Telescope grep_string<cr>") -nmap("<leader>sp", "<cmd>Telescope projects<cr>") -nmap("<leader>sr", "<cmd>Telescope oldfiles<cr>") -nmap("<leader>sb", "<cmd>Telescope git_branches<cr>") -nmap("<leader>sc", "<cmd>Telescope git_commits<cr>") -nmap("<leader>sk", "<cmd>Telescope keymaps<cr>") - --- Terminal -nmap("<leader>gg", "<cmd>lua term_cmd('lazygit')<cr>") -nmap("<leader>D", "<cmd> lua term_cmd('lazydocker')<cr>") - --- DAP -nmap("<leader>dt", "<cmd>lua require'dap'.toggle_breakpoint()<cr>") -nmap("<leader>db", "<cmd>lua require'dap'.step_back()<cr>") -nmap("<leader>dc", "<cmd>lua require'dap'.continue()<cr>") -nmap("<leader>dd", "<cmd>lua require'dap'.disconnect()<cr>") -nmap("<leader>di", "<cmd>lua require'dap'.step_into()<cr>") -nmap("<leader>do", "<cmd>lua require'dap'.step_over()<cr>") -nmap("<leader>du", "<cmd>lua require'dap'.step_out()<cr>") -nmap("<leader>dr", "<cmd>lua require'dap'.repl.toggle()<cr>") -nmap("<leader>dp", "<cmd>lua require'dap'.pause.toggle()<cr>") -nmap("<leader>dq", "<cmd>lua require'dap'.close()<cr>") - --- Ultest -nmap("<leader>tt", "<cmd>Ultest<cr>") -nmap("<leader>ts", "<cmd>UltestStop<cr>") -nmap("<leader>tc", "<cmd>UltestClear<cr>") -nmap("<leader>tn", "<cmd>UltestNearest<cr>") -nmap("<leader>to", "<cmd>UltestOutput<cr>") - --- Buffer -nmap("<A-0>", "<cmd>BufferLast<cr>") -nmap("<C-w>", "<cmd>BufferClose<cr>") -nmap("<leader>c", "<cmd>BufferClose!<cr>") -for i = 1, 9 do - nmap(string.format("<A-%d>", i), string.format("<cmd>BufferGoto %d<cr>", i)) -end
D config/nvim/lua/lsp/attach.lua

@@ -1,26 +0,0 @@

-return function(client, bufnr) - vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc") - client.resolved_capabilities.document_formatting = false - client.resolved_capabilities.document_range_formatting = false - - local function buf_map(...) - vim.api.nvim_buf_set_keymap(bufnr, "n", ...) - end - - local opts = { noremap = true, silent = true } - buf_map("K", "<cmd>lua vim.lsp.buf.hover()<CR>", opts) - buf_map("gd", "<cmd>lua vim.lsp.buf.definition()<CR>", opts) - buf_map("gD", "<cmd>lua vim.lsp.buf.declaration()<CR>", opts) - buf_map("gr", "<cmd>lua vim.lsp.buf.references()<CR>", opts) - buf_map("gI", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts) - buf_map("gs", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts) - buf_map("gl", "<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>", opts) - buf_map("<leader>la", "<cmd>Telescope lsp_code_actions<CR>", opts) - buf_map("<leader>lA", "lua vim.lsp.buf.range_code_action()<CR>", opts) - buf_map("<leader>ld", "<cmd>TroubleToggle<cr>", opts) - buf_map("<leader>lr", "<cmd>lua vim.lsp.buf.rename()<CR>", opts) - buf_map("<leader>lf", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts) - buf_map("<leader>ls", "<cmd>Telescope lsp_document_symbols<CR>", opts) - buf_map("<leader>li", "<cmd>LspInfo<CR>", opts) - buf_map("<leader>lR", "<cmd>LspRestart<CR>", opts) -end
D config/nvim/lua/lsp/init.lua

@@ -1,22 +0,0 @@

-local on_attach = require "lsp.attach" -local M = {} - -function M.setup() - require("nvim-lsp-installer").on_server_ready(function(server) - local opts = { on_attach = on_attach } - - local ok, server_opts = pcall(require, "lsp.providers." .. server.name) - if ok then - opts = vim.tbl_deep_extend("force", opts, server_opts or {}) - end - - server:setup(opts) - - vim.cmd [[ do User LspAttachBuffers ]] - - require("lsp.null").setup() - require("lspconfig")["null-ls"].setup {} - end) -end - -return M
D config/nvim/lua/lsp/null.lua

@@ -1,38 +0,0 @@

-local M = {} - -function M.setup() - local null_ls = require "null-ls" - - local fmt = null_ls.builtins.formatting - local lint = null_ls.builtins.diagnostics - - null_ls.config { - sources = { - -- Lua - fmt.stylua, - lint.selene, - - -- Golang - fmt.gofumpt, - fmt.goimports, - - -- JavaScirpt - fmt.prettierd, - lint.eslint_d, - - -- Shell - fmt.shfmt, - lint.shellcheck, - - -- Python - fmt.black, - fmt.isort, - lint.flake8, - - -- Rust - fmt.rustfmt, - }, - } -end - -return M
D config/nvim/lua/lsp/providers/jsonls.lua

@@ -1,16 +0,0 @@

-return { - settings = { - schemaDownload = { - enable = true, - }, - schemas = { - { fileMatch = { "package.json" }, url = "https://json.schemastore.org/package.json" }, - { url = "https://json.schemastore.org/tsconfig.json", fileMatch = { "tsconfig.json", "tsconfig.*.json" } }, - { url = "https://json.schemastore.org/lerna.json", fileMatch = { "lerna.json" } }, - { url = "https://json.schemastore.org/eslintrc.json", fileMatch = { ".eslintrc.json", ".eslintrc" } }, - { url = "https://json.schemastore.org/prettierrc", fileMatch = { ".prettierrc", ".prettierrc.json", "prettier.config.json" } }, - { fileMatch = { ".golangci.toml", ".golangci.json" }, url = "https://json.schemastore.org/golangci-lint.json" }, - { fileMatch = { "package.json" }, url = "https://json.schemastore.org/package.json" }, - }, - }, -}
D config/nvim/lua/lsp/providers/pyright.lua

@@ -1,8 +0,0 @@

-return { - python = { - analysis = { - autoSearchPaths = true, - useLibraryCodeForTypes = false, - }, - }, -}
D config/nvim/lua/lsp/providers/sqls.lua

@@ -1,12 +0,0 @@

-return { - settings = { - sqls = { - connections = { - { - driver = "postgresql", - dataSourceName = "host=0.0.0.0 port=5432 user=postgres password=qwerty123 dbname=postgres sslmode=disable", - }, - }, - }, - }, -}
D config/nvim/lua/lsp/providers/sumneko_lua.lua

@@ -1,15 +0,0 @@

-return { - settings = { - Lua = { - diagnostics = { globals = { "vim" } }, - workspace = { - library = { - [vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true, - [vim.fn.expand "$VIMRUNTIME/lua"] = true, - }, - maxPreload = 100000, - preloadFileSize = 10000, - }, - }, - }, -}
D config/nvim/lua/lsp/providers/tsserver.lua

@@ -1,19 +0,0 @@

-return { - setup = { - handlers = { - ["textDocument/publishDiagnostics"] = function(_, _, p, id, _, cfg) - if p.diagnostics ~= nil then - local i = 1 - while i <= #p.diagnostics do - if p.diagnostics[i].code == 80001 then - table.remove(p.diagnostics, i) - else - i = i + 1 - end - end - end - vim.lsp.diagnostic.on_publish_diagnostics(_, _, p, id, _, cfg) - end, - }, - }, -}
D config/nvim/lua/lsp/providers/yamlls.lua

@@ -1,14 +0,0 @@

-return { - settings = { - yaml = { - hover = true, - completion = true, - validate = true, - schemaStore = { - enable = true, - url = "https://www.schemastore.org/api/json/catalog.json", - }, - schemas = {}, - }, - }, -}
D config/nvim/lua/options.lua

@@ -1,47 +0,0 @@

-local o = vim.opt - -vim.g.mapleader = " " -vim.g.maplocalleader = "," -vim.g.netrw_banner = false - --- o.laststatus = 0 -o.backup = false -o.clipboard = "unnamedplus" -o.cmdheight = 1 -o.colorcolumn = "99999" -o.completeopt = { "menuone", "noselect" } -o.conceallevel = 0 -o.fileencoding = "utf-8" -o.foldmethod = "manual" -o.foldexpr = "" -o.guifont = "JetBrains Mono Nerd Font:h17" -o.hidden = true -o.hlsearch = true -o.ignorecase = true -o.mouse = "a" -o.pumheight = 10 -o.showmode = false -o.smartcase = true -o.smartindent = true -o.splitbelow = true -o.splitright = true -o.swapfile = false -o.termguicolors = true --- o.timeoutlen = 100 -o.title = true -o.undofile = true -o.updatetime = 300 -o.writebackup = false -o.expandtab = true -o.shiftwidth = 2 -o.tabstop = 2 -o.cursorline = true -o.number = true -o.relativenumber = true -o.numberwidth = 4 -o.signcolumn = "yes" -o.wrap = false -o.spell = false -o.spelllang = "en" -o.scrolloff = 8 -o.sidescrolloff = 8
D config/nvim/lua/plugin.lua

@@ -1,163 +0,0 @@

-return require("packer").startup(function(use) - use "wbthomason/packer.nvim" - use "nvim-lua/plenary.nvim" - use "Mofiqul/vscode.nvim" - use "kyazdani42/nvim-web-devicons" - use "romgrk/barbar.nvim" - use { "dstein64/vim-startuptime", cmd = "StartupTime" } - - use { - "pwntester/octo.nvim", - cmd = "Octo", - opt = true, - config = function() - require("octo").setup() - end, - } - - use { - "numToStr/Comment.nvim", - config = function() - require("Comment").setup() - end, - } - - use { - "windwp/nvim-autopairs", - config = function() - require("nvim-autopairs").setup() - end, - } - - use { - "neovim/nvim-lspconfig", - requires = { - "williamboman/nvim-lsp-installer", - { "jose-elias-alvarez/null-ls.nvim", after = "nvim-lspconfig" }, - }, - config = function() - require("lsp").setup() - end, - } - - use { - "ahmedkhalf/project.nvim", - config = function() - require("plugin.project").setup() - end, - } - - use { - "mfussenegger/nvim-dap", - module = "dap", - requires = { - { "Pocco81/DAPInstall.nvim", requires = "nvim-dap" }, - { "theHamsta/nvim-dap-virtual-text", after = "nvim-dap", config = [[ require"nvim-dap-virtual-text".setup() ]] }, - { "nvim-telescope/telescope-dap.nvim", after = "nvim-dap", config = [[ require("telescope").load_extension "dap" ]] }, - }, - config = function() - require("plugin.dap").setup() - end, - } - - use { - "ray-x/go.nvim", - ft = "go", - opt = true, - config = function() - require("go").setup { gofmt = "gofumpt" } - end, - } - - use { - "lewis6991/gitsigns.nvim", - config = function() - require("plugin.gitsigns").setup() - end, - } - - use { - "nvim-lualine/lualine.nvim", - config = function() - require("plugin.statusline").setup() - end, - } - - use { - "rcarriga/vim-ultest", - requires = { { "vim-test/vim-test", after = "vim-ultest" } }, - cmd = { "Ultest", "UltestStop", "UltestClear", "UltestNearest", "UltestOutput" }, - run = ":UpdateRemotePlugins", - config = function() - require("plugin.ultest").setup() - end, - } - - use { - "hrsh7th/nvim-cmp", - requires = { - { "hrsh7th/cmp-nvim-lua", after = "nvim-cmp" }, - { "hrsh7th/cmp-nvim-lsp", after = "nvim-cmp" }, - { "hrsh7th/cmp-buffer", after = "nvim-cmp" }, - { - "saadparwaiz1/cmp_luasnip", - requires = { - { "L3MON4D3/LuaSnip", after = "cmp_luasnip" }, - { "rafamadriz/friendly-snippets", after = "LuaSnip" }, - }, - }, - }, - config = function() - require("plugin.cmp").setup() - end, - } - - use { - "max397574/better-escape.nvim", - config = function() - require("better_escape").setup { mapping = { "jk" } } - end, - } - - use { - "nvim-telescope/telescope.nvim", - cmd = "Telescope", - module = "telescope", - config = function() - require("plugin.telescope").setup() - end, - } - - use { - "kyazdani42/nvim-tree.lua", - cmd = "NvimTreeToggle", - config = function() - require("plugin.nvimtree").setup() - end, - } - - use { - "nvim-treesitter/nvim-treesitter", - branch = "0.5-compat", - config = function() - require("plugin.treesitter").setup() - end, - } - - use { - "Smirnov-O/ts-unit.nvim", - after = "nvim-treesitter", - config = function() - require("ts-unit").setup { keymaps = true } - end, - } - - use { - "akinsho/toggleterm.nvim", - module = "toggleterm", - keys = "<C-t>", - config = function() - require("plugin.terminal").setup() - end, - } -end)
D config/nvim/lua/plugin/cmp.lua

@@ -1,68 +0,0 @@

-local M = {} - -function M.setup() - local cmp = require "cmp" - - require("luasnip/loaders/from_vscode").lazy_load { - paths = { "~/.local/share/nvim/site/pack/packer/start/friendly-snippets" }, - } - - cmp.event:on("confirm_done", require("nvim-autopairs.completion.cmp").on_confirm_done()) - cmp.setup { - snippet = { - expand = function(args) - require("luasnip").lsp_expand(args.body) - end, - }, - formatting = { - format = function(entry, vim_item) - vim_item.menu = ({ - nvim_lsp = "(L)", - nvim_lua = "(N)", - buffer = "(B)", - luasnip = "(S)", - })[entry.source.name] - - return vim_item - end, - }, - mapping = { - ["<C-j>"] = cmp.mapping.select_next_item(), - ["<C-k>"] = cmp.mapping.select_prev_item(), - ["<C-d>"] = cmp.mapping.scroll_docs(-4), - ["<C-f>"] = cmp.mapping.scroll_docs(4), - ["<C-Space>"] = cmp.mapping.complete(), - ["<C-e>"] = cmp.mapping.close(), - ["<CR>"] = cmp.mapping.confirm { behavior = cmp.ConfirmBehavior.Replace, select = false }, - ["<Tab>"] = function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif require("luasnip").expand_or_jumpable() then - vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-expand-or-jump", true, true, true), "") - else - fallback() - end - end, - ["<S-Tab>"] = function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif require("luasnip").jumpable(-1) then - vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-jump-prev", true, true, true), "") - else - fallback() - end - end, - }, - sources = { - { name = "nvim_lua", max_item_count = 5 }, - { name = "nvim_lsp", max_item_count = 8 }, - { name = "buffer", keyword_length = 4, max_item_count = 5 }, - { name = "luasnip", max_item_count = 4, keyword_length = 2 }, - }, - experimental = { - ghost_text = true, - }, - } -end - -return M
D config/nvim/lua/plugin/dap.lua

@@ -1,24 +0,0 @@

-local M = {} - -function M.setup() - vim.fn.sign_define("DapBreakpoint", { - text = "", - texthl = "LspDiagnosticsSignError", - linehl = "", - numhl = "", - }) - vim.fn.sign_define("DapBreakpointRejected", { - text = "", - texthl = "LspDiagnosticsSignHint", - linehl = "", - numhl = "", - }) - vim.fn.sign_define("DapStopped", { - text = "", - texthl = "LspDiagnosticsSignInformation", - linehl = "DiagnosticUnderlineInfo", - numhl = "LspDiagnosticsSignInformation", - }) -end - -return M
D config/nvim/lua/plugin/gitsigns.lua

@@ -1,53 +0,0 @@

-local M = {} - -function M.setup() - 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" }, - }, - signcolumn = true, - numhl = false, - linehl = false, - word_diff = false, - keymaps = { - noremap = true, - ["n <leader>gs"] = '<cmd>lua require"gitsigns".stage_hunk()<CR>', - ["n <leader>gr"] = '<cmd>lua require"gitsigns".reset_hunk()<CR>', - ["n <leader>gR"] = '<cmd>lua require"gitsigns".reset_buffer()<CR>', - ["n <leader>gp"] = '<cmd>lua require"gitsigns".preview_hunk()<CR>', - ["n <leader>gl"] = '<cmd>lua require"gitsigns".blame_line(true)<CR>', - ["n <leader>gS"] = '<cmd>lua require"gitsigns".stage_buffer()<CR>', - ["n <leader>gU"] = '<cmd>lua require"gitsigns".reset_buffer_index()<CR>', - }, - watch_gitdir = { - interval = 1000, - follow_files = true, - }, - attach_to_untracked = true, - current_line_blame = false, - current_line_blame_opts = { - virt_text = true, - virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align' - delay = 300, - }, - current_line_blame_formatter_opts = { relative_time = false }, - sign_priority = 6, - update_debounce = 100, - status_formatter = nil, - max_file_length = 40000, - preview_config = { - border = "single", - style = "minimal", - relative = "cursor", - row = 0, - col = 1, - }, - yadm = { enable = false }, - } -end - -return M
D config/nvim/lua/plugin/nvimtree.lua

@@ -1,44 +0,0 @@

-local M = {} - -function M.setup() - local tree_cb = require("nvim-tree.config").nvim_tree_callback - - require("nvim-tree").setup { - disable_netrw = true, - hijack_netrw = true, - auto_close = true, - auto_open = true, - update_cwd = false, - diagnostics = { - enable = true, - icons = { - hint = "", - info = "", - warning = "", - error = "", - }, - }, - filters = { - dotfiles = true, - custom = { ".git", "node_modules", "__pycache__", "env", ".bin" }, - }, - view = { - width = 30, - side = "left", - auto_resize = false, - mappings = { - custom_only = false, - list = { - { key = { "l", "<CR>", "o" }, cb = tree_cb "edit" }, - { key = "h", cb = tree_cb "close_node" }, - { key = "v", cb = tree_cb "vsplit" }, - }, - }, - }, - } - - vim.g.nvim_tree_group_empty = 1 - vim.g.nvim_tree_indent_markers = 1 -end - -return M
D config/nvim/lua/plugin/project.lua

@@ -1,15 +0,0 @@

-local M = {} - -function M.setup() - require("project_nvim").setup { - manual_mode = false, - detection_methods = { "lsp", "pattern" }, - patterns = { ".git", ".svn", "Makefile", "package.json", "go.mod" }, - ignore_lsp = {}, - exclude_dirs = {}, - show_hidden = false, - silent_chdir = true, - } -end - -return M
D config/nvim/lua/plugin/statusline.lua

@@ -1,22 +0,0 @@

-local M = {} - -function M.setup() - require("lualine").setup { - options = { - theme = "codedark", - component_separators = { "", "" }, - section_separators = { "", "" }, - disabled_filetypes = { "NvimTree", "Telescope" }, - }, - sections = { - lualine_a = { "branch", "diff" }, - lualine_b = { "filename" }, - lualine_c = {}, - lualine_x = {}, - lualine_y = { { "diagnostics", sources = { "nvim_lsp" } } }, - lualine_z = { "location" }, - }, - } -end - -return M
D config/nvim/lua/plugin/telescope.lua

@@ -1,52 +0,0 @@

-local M = {} - -function M.setup() - local actions = require "telescope.actions" - - require("telescope").setup { - defaults = { - prompt_prefix = " ", - selection_caret = " ", - entry_prefix = " ", - initial_mode = "insert", - selection_strategy = "reset", - sorting_strategy = "descending", - layout_strategy = "horizontal", - layout_config = { - width = 0.75, - preview_cutoff = 120, - prompt_position = "top", - horizontal = { mirror = false }, - vertical = { mirror = false }, - }, - file_ignore_patterns = { ".git", "node_modules", "__pycache__", "target", "env", ".bin" }, - path_display = { shorten = 5 }, - winblend = 0, - border = {}, - borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, - color_devicons = true, - set_env = { ["COLORTERM"] = "truecolor" }, - pickers = { - find_files = { find_command = { "fd", "--type=file", "--hidden", "--smart-case" } }, - live_grep = { only_sort_text = true }, - }, - mappings = { - i = { - ["<C-j>"] = actions.move_selection_next, - ["<C-k>"] = actions.move_selection_previous, - ["<C-u>"] = false, - - ["<C-h>"] = "which_key", - }, - n = { - ["<C-j>"] = actions.move_selection_next, - ["<C-k>"] = actions.move_selection_previous, - }, - }, - }, - } - - require("telescope").load_extension "projects" -end - -return M
D config/nvim/lua/plugin/terminal.lua

@@ -1,28 +0,0 @@

-local M = {} - -function M.setup() - require("toggleterm").setup { - size = 20, - open_mapping = [[<c-t>]], - hide_numbers = true, - shade_filetypes = {}, - shade_terminals = true, - shading_factor = 2, - start_in_insert = true, - insert_mappings = true, - persist_size = false, - direction = "float", - close_on_exit = true, - shell = vim.o.shell, - float_opts = { - border = "curved", - winblend = 0, - highlights = { - border = "Normal", - background = "Normal", - }, - }, - } -end - -return M
D config/nvim/lua/plugin/treesitter.lua

@@ -1,20 +0,0 @@

-local M = {} - -function M.setup() - require("nvim-treesitter.configs").setup { - ensure_installed = { "lua", "go", "gomod" }, - highlight = { enable = true }, - indent = { enable = true, disable = { "python", "yml" } }, - autotag = { enable = true }, - context_commentstring = { enable = true }, - rainbow = { - enable = false, - extended_mode = true, - max_file_lines = 500, - }, - } - - local parser_configs = require("nvim-treesitter.parsers").get_parser_configs() -end - -return M
D config/nvim/lua/plugin/ultest.lua

@@ -1,7 +0,0 @@

-local M = {} - -function M.setup() - vim.g["test#go#gotest#optiongs"] = "-v" -end - -return M
D config/nvim/lua/utils.lua

@@ -1,27 +0,0 @@

-local M = {} - -M.opts = { noremap = true, silent = true } - -function M._map(mode, from, to, opts) - vim.api.nvim_set_keymap(mode, from, to, opts) -end - -function M.map(mode, from, to) - if type(mode) == "table" then - for _, m in pairs(mode) do - M._map(m, from, to, M.opts) - end - end - - M._map(mode, from, to, M.opts) -end - -function M.nmap(from, to) - M._map("n", from, to, M.opts) -end - -function M.expr(mode, from, to) - M._map(mode, from, to, { noremap = true, expr = true }) -end - -return M
D config/nvim/selene.toml

@@ -1,1 +0,0 @@

-std="lua51+vim"
D config/nvim/stylua.toml

@@ -1,6 +0,0 @@

-column_width = 140 -line_endings = "Unix" -indent_type = "Spaces" -indent_width = 2 -quote_style = "AutoPreferDouble" -no_call_parentheses = true
D config/nvim/vim.toml

@@ -1,5 +0,0 @@

-[vim] -any = true - -[_G] -any = true