edit keymaps file to fix error upon opening vim
This commit is contained in:
parent
9f0ca28ce0
commit
7157bd73c9
73
init.lua
73
init.lua
|
@ -271,37 +271,36 @@ require('lazy').setup({
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- NOTE: Plugins can also be configured to run lua code when they are loaded.
|
-- NOTE: Plugins can also be configured to run lua code when they are loaded.
|
||||||
--
|
--
|
||||||
-- This is often very useful to both group configuration, as well as handle
|
-- This is often very useful to both group configuration, as well as handle
|
||||||
-- lazy loading plugins that don't need to be loaded immediately at startup.
|
-- lazy loading plugins that don't need to be loaded immediately at startup.
|
||||||
--
|
--
|
||||||
-- For example, in the following configuration, we use:
|
-- For example, in the following configuration, we use:
|
||||||
-- event = 'VeryLazy'
|
-- event = 'VeryLazy'
|
||||||
--
|
--
|
||||||
-- which loads which-key after all the UI elements are loaded. Events can be
|
-- which loads which-key after all the UI elements are loaded. Events can be
|
||||||
-- normal autocommands events (:help autocomd-events).
|
-- normal autocommands events (:help autocomd-events).
|
||||||
--
|
--
|
||||||
-- Then, because we use the `config` key, the configuration only runs
|
-- Then, because we use the `config` key, the configuration only runs
|
||||||
-- after the plugin has been loaded:
|
-- after the plugin has been loaded:
|
||||||
-- config = function() ... end
|
-- config = function() ... end
|
||||||
|
{ -- Useful plugin to show you pending keybinds.
|
||||||
|
'folke/which-key.nvim',
|
||||||
|
event = 'VeryLazy', -- Sets the loading event to 'VeryLazy'
|
||||||
|
config = function() -- This is the function that runs, AFTER loading
|
||||||
|
require('which-key').setup()
|
||||||
|
|
||||||
{ -- Useful plugin to show you pending keybinds.
|
-- Document existing key chains
|
||||||
'folke/which-key.nvim',
|
require('which-key').register {
|
||||||
event = 'VeryLazy', -- Sets the loading event to 'VeryLazy'
|
['<leader>c'] = { name = '[C]ode', _ = 'which_key_ignore' },
|
||||||
config = function() -- This is the function that runs, AFTER loading
|
['<leader>d'] = { name = '[D]ocument', _ = 'which_key_ignore' },
|
||||||
require('which-key').setup()
|
['<leader>r'] = { name = '[R]ename', _ = 'which_key_ignore' },
|
||||||
|
['<leader>s'] = { name = '[S]earch', _ = 'which_key_ignore' },
|
||||||
-- Document existing key chains
|
['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
|
||||||
require('which-key').register {
|
}
|
||||||
['<leader>c'] = { name = '[C]ode', _ = 'which_key_ignore' },
|
end,
|
||||||
['<leader>d'] = { name = '[D]ocument', _ = 'which_key_ignore' },
|
},
|
||||||
['<leader>r'] = { name = '[R]ename', _ = 'which_key_ignore' },
|
|
||||||
['<leader>s'] = { name = '[S]earch', _ = 'which_key_ignore' },
|
|
||||||
['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- NOTE: Plugins can specify dependencies.
|
-- NOTE: Plugins can specify dependencies.
|
||||||
--
|
--
|
||||||
|
@ -553,8 +552,8 @@ require('lazy').setup({
|
||||||
-- clangd = {},
|
-- clangd = {},
|
||||||
gopls = {},
|
gopls = {},
|
||||||
phpactor = {},
|
phpactor = {},
|
||||||
|
|
||||||
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||||
--
|
--
|
||||||
-- Some languages (like typescript) have entire language plugins that can be useful:
|
-- Some languages (like typescript) have entire language plugins that can be useful:
|
||||||
-- https://github.com/pmizio/typescript-tools.nvim
|
-- https://github.com/pmizio/typescript-tools.nvim
|
||||||
|
@ -825,25 +824,17 @@ require('lazy').setup({
|
||||||
--
|
--
|
||||||
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
||||||
-- For additional information see: :help lazy.nvim-lazy.nvim-structuring-your-plugins
|
-- For additional information see: :help lazy.nvim-lazy.nvim-structuring-your-plugins
|
||||||
<<<<<<< HEAD
|
|
||||||
{ import = 'custom.plugins' },
|
{ import = 'custom.plugins' },
|
||||||
=======
|
|
||||||
{ import = 'custom.plugins' },
|
|
||||||
>>>>>>> 6ecc6f96c43a98f2ed0a64d16d71b5cae8828a54
|
|
||||||
}, {})
|
}, {})
|
||||||
|
|
||||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||||
-- vim: ts=2 sts=2 sw=2 et
|
-- vim: ts=2 sts=2 sw=2 et
|
||||||
<<<<<<< HEAD
|
|
||||||
--
|
|
||||||
--
|
|
||||||
-- Override default Grey Color Line Number with White
|
-- Override default Grey Color Line Number with White
|
||||||
vim.cmd 'highlight LineNr guifg=#ffffff'
|
vim.cmd 'highlight LineNr guifg=#ffffff'
|
||||||
|
|
||||||
-- Hopefully adds Clipboard Support
|
-- Hopefully adds Clipboard Support
|
||||||
vim.o.clipboard = 'unnamedplus'
|
vim.o.clipboard = 'unnamedplus'
|
||||||
=======
|
|
||||||
|
|
||||||
-- Override default Grey Color Line Number with White
|
-- Override default Grey Color Line Number with White
|
||||||
vim.cmd 'highlight LineNr guifg=#ffffff'
|
vim.cmd 'highlight LineNr guifg=#ffffff'
|
||||||
>>>>>>> 6ecc6f96c43a98f2ed0a64d16d71b5cae8828a54
|
|
||||||
|
|
|
@ -1,14 +1,19 @@
|
||||||
-- Map <Leader>nt to toggle nvim-tree
|
local keymaps = {
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>t', ':NvimTreeToggle<CR>', { noremap = true, silent = true })
|
|
||||||
|
|
||||||
-- Map <C-p> to switch focus between nvim-tree and code
|
-- Map <Leader>nt to toggle nvim-tree
|
||||||
vim.api.nvim_set_keymap('n', '<C-f>', ':NvimTreeFocus<CR>', { noremap = true, silent = true })
|
vim.api.nvim_set_keymap('n', '<C-t>', ':NvimTreeToggle<CR>', { noremap = true, silent = true }),
|
||||||
|
|
||||||
-- Map 'a' to create a new file
|
-- Map <C-p> to switch focus between nvim-tree and code
|
||||||
vim.api.nvim_set_keymap('n', 'a', ':NvimTreeNewFile<CR>', { noremap = true, silent = true })
|
vim.api.nvim_set_keymap('n', '<C-f>', ':NvimTreeFocus<CR>', { noremap = true, silent = true }),
|
||||||
|
|
||||||
-- Map <Leader>nd to delete selected file/directory
|
-- Map 'a' to create a new file
|
||||||
vim.api.nvim_set_keymap('n', 'C-d', ':NvimTreeDelete<CR>', { noremap = true, silent = true })
|
vim.api.nvim_set_keymap('n', 'a', ':NvimTreeNewFile<CR>', { noremap = true, silent = true }),
|
||||||
|
|
||||||
-- Map <Leader>nr to rename selected file/directory
|
-- Map <Leader>nd to delete selected file/directory
|
||||||
vim.api.nvim_set_keymap('n', 'r', ':NvimTreeRename<CR>', { noremap = true, silent = true })
|
vim.api.nvim_set_keymap('n', 'd', ':NvimTreeDelete<CR>', { noremap = true, silent = true }),
|
||||||
|
|
||||||
|
-- Map <Leader>nr to rename selected file/directory
|
||||||
|
vim.api.nvim_set_keymap('n', 'r', ':NvimTreeRename<CR>', { noremap = true, silent = true }),
|
||||||
|
}
|
||||||
|
|
||||||
|
return keymaps
|
||||||
|
|
Loading…
Reference in New Issue