all repos

init.lua @ e3d74c9b8b01611a0870ef0bd36c546283736342

my nvim config
7 files changed, 20 insertions(+), 59 deletions(-)
Clean up config
Author: neoteny ss2316544@gmail.com
Committed at: 2022-02-05 12:30:53 +0200
Parent: d3e1aa4
M lua/globals.lua

@@ -1,8 +1,4 @@

-- selene: allow(global_usage) -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
M lua/plugin.lua

@@ -9,35 +9,14 @@

use { "~/code/gopher.nvim", ft = "go" } use { "metakirby5/codi.vim", cmd = "Codi" } - use { "folke/which-key.nvim", config = get_config "plugin.whichkey" } use { "tpope/vim-surround", keys = { "c", "d", "y" } } + use { "folke/which-key.nvim", config = get_config "plugin.whichkey" } use { "ahmedkhalf/project.nvim", config = get_config "plugin.project" } use { "nvim-lualine/lualine.nvim", config = get_config "plugin.statusline" } - use { "pwntester/octo.nvim", cmd = "Octo" } - - use { - "TimUntersberger/neogit", - cmd = "Neogit", - config = get_config "neogit", - } - - use { - "folke/lua-dev.nvim", - config = get_config "lua-dev", - ft = "lua", - } - - use { - "kyazdani42/nvim-tree.lua", - cmd = "NvimTreeToggle", - config = get_config "plugin.nvimtree", - } - - use { - "numToStr/Comment.nvim", - keys = { "gc" }, - config = get_config "Comment", - } + use { "TimUntersberger/neogit", cmd = "Neogit", config = get_config "neogit" } + use { "numToStr/Comment.nvim", keys = { "gc" }, config = get_config "Comment" } + use { "folke/lua-dev.nvim", config = get_config "lua-dev", ft = "lua" } + use { "folke/todo-comments.nvim", config = get_config "todo-comments" } use { "windwp/nvim-autopairs",

@@ -50,11 +29,6 @@ use {

"lewis6991/gitsigns.nvim", event = "BufEnter", config = get_config "plugin.gitsigns", - } - - use { - "folke/todo-comments.nvim", - config = get_config "todo-comments", } use {
M lua/plugin/nvimtree.lua

@@ -17,15 +17,15 @@ info = "",

warning = "", error = "", }, - filters = { - dotfiles = true, - custom = { ".git", "node_modules", "__pycache__", "vendor", "env", ".bin" }, - }, + }, + filters = { + dotfiles = false, + custom = { ".git", "node_modules", "__pycache__", "vendor", "env", ".bin" }, }, view = { width = 30, auto_resize = false, - hide_root_folder = true, + hide_root_folder = false, mappings = { custom_only = false, list = {
M lua/plugin/project.lua

@@ -4,7 +4,7 @@ function M.setup()

require("project_nvim").setup { manual_mode = false, detection_methods = { "lsp", "pattern" }, - patterns = { ".git", ".svn", "Makefile", "Justfile", "justfile", "package.json", "go.mod" }, + patterns = { ".git", ".svn", "Makefile", "Justfile", "package.json", "go.mod" }, ignore_lsp = {}, exclude_dirs = {}, show_hidden = false,
M lua/plugin/telescope.lua

@@ -3,7 +3,6 @@

function M.setup() local actions = require "telescope.actions" local action_layout = require "telescope.actions.layout" - -- local themes = require "telescope.themes" require("telescope").setup { defaults = {

@@ -22,7 +21,6 @@ horizontal = { mirror = false },

vertical = { mirror = false }, }, file_ignore_patterns = { ".git", "node_modules", "__pycache__", "target", "vendor", "env", ".bin" }, - -- path_display = { shorten = 5 }, winblend = 0, border = {}, borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" },
M lua/plugin/treesitter.lua

@@ -15,6 +15,15 @@ },

refactor = { highlight_definitions = { enable = true }, }, + incremental_selection = { + enable = true, + keymaps = { + init_selection = "<CR>", + scope_incremental = "<CR>", + node_incremental = "<TAB>", + node_decremental = "<S-TAB>", + }, + }, playground = { enable = true, keybindings = {
M lua/utils.lua

@@ -2,22 +2,6 @@ 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) - 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 - function M.get_config(name) return string.format("require[[%s]].setup()", name) end