Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable operators to support gcc comments #81

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ require "user.options"
require "user.keymaps"
require "user.plugins"
require "user.colorscheme"
vim.cmd "colorscheme nord"
require "user.cmp"
require "user.lsp"
require "user.telescope"
Expand Down
4 changes: 2 additions & 2 deletions lua/user/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ local term_opts = { silent = true }
-- Shorten function name
local keymap = vim.api.nvim_set_keymap

--Remap space as leader key
-- Remap space as leader key
keymap("", "<Space>", "<Nop>", opts)
vim.g.mapleader = " "
vim.g.maplocalleader = " "
Expand Down Expand Up @@ -41,7 +41,7 @@ keymap("n", "<A-k>", "<Esc>:m .-2<CR>==gi", opts)

-- Insert --
-- Press jk fast to enter
keymap("i", "jk", "<ESC>", opts)
-- keymap("i", "jk", "<ESC>", opts)

-- Visual --
-- Stay in indent mode
Expand Down
2 changes: 1 addition & 1 deletion lua/user/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ local options = {
splitbelow = true, -- force all horizontal splits to go below current window
splitright = true, -- force all vertical splits to go to the right of current window
swapfile = false, -- creates a swapfile
-- termguicolors = true, -- set term gui colors (most terminals support this)
termguicolors = true, -- set term gui colors (most terminals support this)
timeoutlen = 100, -- time to wait for a mapped sequence to complete (in milliseconds)
undofile = true, -- enable persistent undo
updatetime = 300, -- faster completion (4000ms default)
Expand Down
21 changes: 18 additions & 3 deletions lua/user/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,17 @@ return packer.startup(function(use)
use "moll/vim-bbye"
use "nvim-lualine/lualine.nvim"
use "akinsho/toggleterm.nvim"
use "ahmedkhalf/project.nvim"
use "lewis6991/impatient.nvim"
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 "lunarvim/colorschemes" -- A bunch of colorschemes you can try out
use "lunarvim/darkplus.nvim"
use "lunarvim/colorschemes" -- A bunch of colorschemes you can try out
use "arcticicestudio/nord-vim"
-- use "lunarvim/darkplus.nvim"


-- cmp plugins
use "hrsh7th/nvim-cmp" -- The completion plugin
Expand Down Expand Up @@ -94,6 +95,20 @@ return packer.startup(function(use)
-- Git
use "lewis6991/gitsigns.nvim"

-- project
use {
"ahmedkhalf/project.nvim",
config = function()
require("project_nvim").setup {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
}
end
}

use "terryma/vim-multiple-cursors"

-- Automatically set up your configuration after cloning packer.nvim
-- Put this at the end after all plugins
if PACKER_BOOTSTRAP then
Expand Down
2 changes: 1 addition & 1 deletion lua/user/toggleterm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function _G.set_terminal_keymaps()
vim.api.nvim_buf_set_keymap(0, 't', '<C-h>', [[<C-\><C-n><C-W>h]], opts)
vim.api.nvim_buf_set_keymap(0, 't', '<C-j>', [[<C-\><C-n><C-W>j]], opts)
vim.api.nvim_buf_set_keymap(0, 't', '<C-k>', [[<C-\><C-n><C-W>k]], opts)
vim.api.nvim_buf_set_keymap(0, 't', '<C-l>', [[<C-\><C-n><C-W>l]], opts)
-- vim.api.nvim_buf_set_keymap(0, 't', '<C-l>', [[<C-\><C-n><C-W>l]], opts)
end

vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()')
Expand Down
3 changes: 2 additions & 1 deletion lua/user/whichkey.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ local setup = {
-- the presets plugin, adds help for a bunch of default keybindings in Neovim
-- No actual key bindings are created
presets = {
operators = false, -- adds help for operators like d, y, ... and registers them for motion / text object completion
operators = true, -- adds help for operators like d, y, ... and registers them for motion / text object completion
motions = true, -- adds help for motions
text_objects = true, -- help for text objects triggered after entering an operator
windows = true, -- default bindings on <c-w>
Expand Down Expand Up @@ -95,6 +95,7 @@ local mappings = {
},
["F"] = { "<cmd>Telescope live_grep theme=ivy<cr>", "Find Text" },
["P"] = { "<cmd>lua require('telescope').extensions.projects.projects()<cr>", "Projects" },
["r"] = { "<cmd>Telescope command_history<CR>", "Command History" },

p = {
name = "Packer",
Expand Down