Adding gfold

This commit is contained in:
Zoe Roux
2022-02-27 23:39:57 +01:00
parent 281fcde936
commit be82bb7ac3
8 changed files with 23 additions and 49 deletions
-1
View File
@@ -6,7 +6,6 @@ require "user.cmp"
require "user.lsp"
require "user.telescope"
require "user.treesitter"
require "user.autopairs"
require "user.comment"
require "user.gitsigns"
require "user.nvim-tree"
@@ -1,5 +1,4 @@
vim.cmd [[
augroup _general_settings
vim.cmd [[ augroup _general_settings
autocmd!
autocmd FileType qf,help,man,lspinfo nnoremap <silent> <buffer> q :close<CR>
autocmd FileType qf,help,man,lspinfo set cc=""
@@ -1,33 +0,0 @@
-- Setup nvim-cmp.
local status_ok, npairs = pcall(require, "nvim-autopairs")
if not status_ok then
return
end
npairs.setup {
check_ts = true,
ts_config = {
lua = { "string", "source" },
javascript = { "string", "template_string" },
},
enable_check_bracket_line = false,
disable_filetype = { "TelescopePrompt", "spectre_panel" },
fast_wrap = {
map = "<M-e>",
chars = { "{", "[", "(", '"', "'" },
pattern = string.gsub([[ [%'%"%)%>%]%)%}%,] ]], "%s+", ""),
offset = 0, -- Offset from pattern match
end_key = "$",
keys = "qwertyuiopzxcvbnmasdfghjkl",
check_comma = true,
highlight = "PmenuSel",
highlight_grey = "LineNr",
},
}
local cmp_autopairs = require "nvim-autopairs.completion.cmp"
local cmp_status_ok, cmp = pcall(require, "cmp")
if not cmp_status_ok then
return
end
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done { map_char = { tex = "" } })
@@ -12,10 +12,11 @@ keymap("o", ")", "]", {silent = true})
keymap("o", "(", "[", {silent = true})
keymap("n", "_", "\\", {silent = true})
--Remap space as leader key
--Remap space and enter as leader key
keymap("", "<Space>", "<Nop>", opts)
vim.g.mapleader = " "
vim.g.maplocalleader = " "
keymap("n", "<Enter>", "<Leader>", {silent = true})
-- Modes
-- normal_mode = "n",
@@ -1,7 +1,7 @@
local options = {
backup = false, -- creates a backup file
clipboard = "unnamedplus", -- allows neovim to access the system clipboard
cmdheight = 2, -- more space in the neovim command line for displaying messages
cmdheight = 1, -- more space in the neovim command line for displaying messages
completeopt = { "menuone", "noselect" }, -- mostly just for cmp
conceallevel = 0, -- so that `` is visible in markdown files
fileencoding = "utf-8", -- the encoding written to a file
@@ -23,7 +23,7 @@ local options = {
writebackup = false, -- if a file is being edited by another program (or was written to file while editing with another program), it is not allowed to be edited
expandtab = false, -- convert tabs to spaces
shiftwidth = 4, -- the number of spaces inserted for each indentation
tabstop = 4, -- insert 2 spaces for a tab
tabstop = 4, -- insert 4 spaces for a tab
cursorline = true, -- highlight the current line
number = true, -- set numbered lines
relativenumber = true, -- set relative numbered lines
@@ -44,7 +44,6 @@ local options = {
fillchars = {
diff = "╱",
},
cc = "80,120"
}
vim.opt.shortmess:append "c"
@@ -61,4 +60,3 @@ vim.g.colorizer_nomap = 1
vim.g.targets_gracious = 1 -- for wellle/targets.vim
-- require("virt-column").setup({ char = "▏" })
+15 -6
View File
@@ -47,14 +47,14 @@ return packer.startup(function(use)
use "tpope/vim-repeat"
use "tpope/vim-surround"
use "tpope/vim-abolish"
use "tpope/vim-unimpaired"
use "wellle/targets.vim"
use "justinmk/vim-sneak"
use "mg979/vim-visual-multi"
use {"RRethy/vim-hexokinase", run = "make hexokinase"}
use "lukas-reineke/virt-column.nvim"
use "windwp/nvim-autopairs" -- Autopairs, integrates with both cmp and treesitter
use "numToStr/Comment.nvim" -- Easily comment stuff
use "numToStr/Comment.nvim"
use "nishigori/increment-activator"
use {'ZhiyuanLck/smart-pairs', event = 'InsertEnter', config = function() require('pairs'):setup() end}
use "moll/vim-bbye"
use "Pocco81/AutoSave.nvim"
@@ -62,7 +62,6 @@ return packer.startup(function(use)
use "lukas-reineke/indent-blankline.nvim"
use "goolord/alpha-nvim"
use "antoinemadec/FixCursorHold.nvim" -- This is needed to fix lsp doc highlight
use "folke/which-key.nvim"
-- Colorschemes
use "folke/tokyonight.nvim"
@@ -71,6 +70,16 @@ return packer.startup(function(use)
use "kyazdani42/nvim-web-devicons"
use "kyazdani42/nvim-tree.lua"
use "petertriho/nvim-scrollbar"
use "folke/which-key.nvim"
use {'stevearc/dressing.nvim'}
use {
"AckslD/nvim-gfold.lua",
config = function()
require('gfold').setup()
end,
}
use {"RRethy/vim-hexokinase", run = "make hexokinase"}
-- use "lukas-reineke/virt-column.nvim"
-- cmp plugins
use "hrsh7th/nvim-cmp" -- The completion plugin
@@ -92,9 +92,9 @@ local mappings = {
"Find files",
},
["F"] = { "<cmd>Telescope live_grep theme=ivy<cr>", "Find Text" },
-- ["P"] = { "<cmd>lua require('telescope').extensions.projects.projects()<cr>", "Projects" },
["p"] = { "<cmd>lua require('gfold').pick_repo()<cr>", "Projects" },
p = {
P = {
name = "Packer",
c = { "<cmd>PackerCompile<cr>", "Compile" },
i = { "<cmd>PackerInstall<cr>", "Install" },
+1
View File
@@ -1,3 +1,4 @@
neovim
ripgrep
fd
gfold