updates
This commit is contained in:
parent
684ded0639
commit
90faa4a60f
@ -54,22 +54,6 @@ autocmd("CursorMoved", {
|
||||
group = _group,
|
||||
})
|
||||
|
||||
function Toggleln()
|
||||
if vim.b.lnstatus == nil then
|
||||
vim.b.lnstatus = "number"
|
||||
end
|
||||
|
||||
if vim.b.lnstatus == "number" then
|
||||
vim.o.number = false
|
||||
vim.o.relativenumber = false
|
||||
vim.b.lnstatus = "nonumber"
|
||||
else
|
||||
vim.o.number = true
|
||||
vim.o.relativenumber = true
|
||||
vim.b.lnstatus = "number"
|
||||
end
|
||||
end
|
||||
|
||||
-- change tmux title
|
||||
autocmd("BufReadPost", {
|
||||
pattern = "*",
|
||||
|
@ -3,27 +3,11 @@ local vimp = require('vimp')
|
||||
-- Map leader
|
||||
vim.g.mapleader = " "
|
||||
|
||||
-- NvimTree
|
||||
vimp.noremap({ 'silent' }, '<leader>n', [[:NvimTreeToggle<CR>]])
|
||||
|
||||
-- Telescope
|
||||
vimp.noremap({ 'silent' }, '<leader>ff', [[:Telescope find_files<CR>]])
|
||||
vimp.noremap({ 'silent' }, '<leader>fg', [[:Telescope live_grep<CR>]])
|
||||
vimp.noremap({ 'silent' }, '<leader>fb', [[:Telescope buffers<CR>]])
|
||||
|
||||
-- tabs and stuff
|
||||
vimp.vnoremap('<C-b>', [[<C-a>]])
|
||||
vimp.noremap("<Tab>", [[>gv]])
|
||||
vimp.noremap("<S-Tab>", [[<gv]])
|
||||
|
||||
-- tabline
|
||||
vimp.nnoremap({ 'silent' }, '<A-Right>', [[:TablineBufferNext<CR>]])
|
||||
vimp.nnoremap({ 'silent' }, '<A-Left>', [[:TablineBufferPrevious<CR>]])
|
||||
|
||||
-- markdown
|
||||
vimp.noremap({ 'silent' }, '<leader>md', [[:MarkdownPreviewToggle<CR>]])
|
||||
|
||||
|
||||
-- Remove search highlight on Enter
|
||||
vimp.nnoremap("<CR>", [[:nohlsearch<CR><CR>]])
|
||||
|
||||
@ -31,8 +15,18 @@ vimp.nnoremap("<CR>", [[:nohlsearch<CR><CR>]])
|
||||
vimp.xnoremap("<", [[<gv]])
|
||||
vimp.xnoremap(">", [[>gv]])
|
||||
|
||||
-- ArgWrap
|
||||
vimp.nnoremap({ 'silent' }, '<leader>a', [[:ArgWrap<CR>]])
|
||||
|
||||
-- Toggle Line
|
||||
vimp.nnoremap({ 'silent' }, '<leader>l', [[:lua Toggleln()<CR>]])
|
||||
-- Toggle Lines
|
||||
vimp.nnoremap({ 'silent' }, '<leader>l', function()
|
||||
if vim.b.lnstatus == nil then
|
||||
vim.b.lnstatus = "number"
|
||||
end
|
||||
if vim.b.lnstatus == "number" then
|
||||
vim.o.number = false
|
||||
vim.o.relativenumber = false
|
||||
vim.b.lnstatus = "nonumber"
|
||||
else
|
||||
vim.o.number = true
|
||||
vim.o.relativenumber = true
|
||||
vim.b.lnstatus = "number"
|
||||
end
|
||||
end)
|
||||
|
@ -1,3 +1,4 @@
|
||||
local vimp = require('vimp')
|
||||
return {
|
||||
|
||||
--vimp (in mappings.lua)
|
||||
@ -66,7 +67,8 @@ return {
|
||||
{
|
||||
"iamcco/markdown-preview.nvim",
|
||||
run = "cd app && npm install",
|
||||
init = function()
|
||||
config = function()
|
||||
vimp.noremap({ 'silent' }, '<leader>md', [[:MarkdownPreviewToggle<CR>]])
|
||||
vim.g.mkdp_filetypes = { "markdown" }
|
||||
vim.g.mkdp_markdown_css = os.getenv("XDG_CONFIG_HOME") .. '/nvim/static/custom.css'
|
||||
vim.g.mkdp_highlight_css = os.getenv("XDG_CACHE_HOME") .. '/wal/colors.css'
|
||||
@ -133,12 +135,18 @@ return {
|
||||
'nvim-lua/plenary.nvim',
|
||||
lazy = true
|
||||
},
|
||||
}
|
||||
},
|
||||
config = function()
|
||||
vimp.noremap({ 'silent' }, '<leader>ff', [[:Telescope find_files<CR>]])
|
||||
vimp.noremap({ 'silent' }, '<leader>fg', [[:Telescope live_grep<CR>]])
|
||||
vimp.noremap({ 'silent' }, '<leader>fb', [[:Telescope buffers<CR>]])
|
||||
end
|
||||
},
|
||||
|
||||
-- file explorer
|
||||
{
|
||||
'kyazdani42/nvim-tree.lua',
|
||||
vimp.noremap({ 'silent' }, '<leader>n', [[:NvimTreeToggle<CR>]]),
|
||||
dependencies = { 'kyazdani42/nvim-web-devicons' },
|
||||
config = function()
|
||||
require('nvim-tree').setup {
|
||||
@ -186,13 +194,10 @@ return {
|
||||
'mg979/vim-visual-multi',
|
||||
|
||||
-- wrap things inside pairs
|
||||
'FooSoft/vim-argwrap',
|
||||
|
||||
-- which key
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
'FooSoft/vim-argwrap',
|
||||
config = function()
|
||||
require("which-key").setup {}
|
||||
vimp.nnoremap({ 'silent' }, '<leader>a', [[:ArgWrap<CR>]])
|
||||
end
|
||||
},
|
||||
|
||||
@ -340,6 +345,8 @@ return {
|
||||
'kdheepak/tabline.nvim',
|
||||
dependencies = { { 'kyazdani42/nvim-web-devicons', lazy = true } },
|
||||
config = function()
|
||||
vimp.nnoremap({ 'silent' }, '<A-Right>', [[:TablineBufferNext<CR>]])
|
||||
vimp.nnoremap({ 'silent' }, '<A-Left>', [[:TablineBufferPrevious<CR>]])
|
||||
require('tabline').setup({ options = { theme = 'pywal-nvim' } })
|
||||
end,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user