mirror of
https://github.com/nvim-lua/kickstart.nvim.git
synced 2025-06-22 13:23:46 +02:00
AC - seperated config out of kickstart
This commit is contained in:
parent
07065db0bd
commit
e8ed1e08cd
2 changed files with 58 additions and 70 deletions
51
lua/custom/init.lua
Normal file
51
lua/custom/init.lua
Normal file
|
@ -0,0 +1,51 @@
|
|||
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||
callback = function()
|
||||
vim.highlight.on_yank()
|
||||
local copy_to_unnamedplus = require('vim.ui.clipboard.osc52').copy '+'
|
||||
copy_to_unnamedplus(vim.v.event.regcontents)
|
||||
local copy_to_unnamed = require('vim.ui.clipboard.osc52').copy '*'
|
||||
copy_to_unnamed(vim.v.event.regcontents)
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||
callback = function()
|
||||
vim.highlight.on_yank()
|
||||
local copy_to_unnamedplus = require('vim.ui.clipboard.osc52').copy '+'
|
||||
copy_to_unnamedplus(vim.v.event.regcontents)
|
||||
local copy_to_unnamed = require('vim.ui.clipboard.osc52').copy '*'
|
||||
copy_to_unnamed(vim.v.event.regcontents)
|
||||
end,
|
||||
})
|
||||
|
||||
vim.keymap.set('n', '<space>st', function()
|
||||
vim.cmd.vnew()
|
||||
vim.cmd.term()
|
||||
vim.cmd.wincmd 'J'
|
||||
vim.api.nvim_win_set_height(0, 15)
|
||||
end)
|
||||
|
||||
vim.api.nvim_set_keymap('t', '<C-Space>', '<C-\\><C-n>', { noremap = true })
|
||||
|
||||
vim.api.nvim_create_autocmd('Filetype', {
|
||||
pattern = 'terraform',
|
||||
callback = function()
|
||||
vim.bo.commentstring = '# %s'
|
||||
end,
|
||||
})
|
||||
|
||||
require('lazy').setup {
|
||||
|
||||
{
|
||||
'windwp/nvim-autopairs',
|
||||
event = 'InsertEnter',
|
||||
config = true,
|
||||
-- use opts = {} for passing setup options
|
||||
-- this is equivalent to setup({}) function
|
||||
},
|
||||
{
|
||||
'mrcjkb/rustaceanvim',
|
||||
version = '^6', -- Recommended
|
||||
lazy = false, -- This plugin is already lazy
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue