95 lines
2.5 KiB
Lua
95 lines
2.5 KiB
Lua
-------------
|
|
-- plugins --
|
|
-------------
|
|
require "paq" {
|
|
"savq/paq-nvim"; -- Let Paq manage itself
|
|
-- general plugins
|
|
"nvim-lualine/lualine.nvim";
|
|
--{ 'nvim-tree/nvim-web-devicons', opt=true };
|
|
'nvim-tree/nvim-web-devicons';
|
|
'romgrk/barbar.nvim';
|
|
'ggandor/lightspeed.nvim';
|
|
'L3MON4D3/LuaSnip'; -- Snippets plugin
|
|
'saadparwaiz1/cmp_luasnip'; -- Snippets source for nvim-cmp
|
|
|
|
-- colorschemes --
|
|
'rebelot/kanagawa.nvim';
|
|
'folke/tokyonight.nvim';
|
|
|
|
-- code related --
|
|
'neovim/nvim-lspconfig'; -- Configs for Nvim LSP
|
|
'hrsh7th/nvim-cmp'; -- Autocompletion plugin
|
|
'hrsh7th/cmp-nvim-lsp'; -- LSP source for nvim-cmp
|
|
|
|
'nvim-lua/plenary.nvim'; -- Dependency for telescope
|
|
'nvim-telescope/telescope.nvim'; -- Fuzzy finder
|
|
{'nvim-telescope/telescope-fzf-native.nvim', run='make' };
|
|
'nvim-treesitter/nvim-treesitter'; -- Better syntax highlighting
|
|
'nvim-tree/nvim-tree.lua'; -- File Explorer
|
|
'numToStr/Comment.nvim'; -- Quickly comment lines
|
|
'windwp/nvim-autopairs';
|
|
'tpope/vim-surround';
|
|
'lukas-reineke/indent-blankline.nvim';
|
|
'ap/vim-css-color';
|
|
|
|
-- writing
|
|
'dhruvasagar/vim-table-mode';
|
|
'folke/zen-mode.nvim';
|
|
'folke/twilight.nvim';
|
|
}
|
|
|
|
-- looks like tablemode for vim-table-mode in markdown
|
|
vim.cmd [[
|
|
function! s:isAtStartOfLine(mapping)
|
|
let text_before_cursor = getline('.')[0 : col('.')-1]
|
|
let mapping_pattern = '\V' . escape(a:mapping, '\')
|
|
let comment_pattern = '\V' . escape(substitute(&l:commentstring, '%s.*$', '', ''), '\')
|
|
return (text_before_cursor =~? '^' . ('\v(' . comment_pattern . '\v)?') . '\s*\v' . mapping_pattern . '\v$')
|
|
endfunction
|
|
|
|
inoreabbrev <expr> <bar><bar>
|
|
\ <SID>isAtStartOfLine('\|\|') ?
|
|
\ '<c-o>:TableModeEnable<cr><bar><space><bar><left><left>' : '<bar><bar>'
|
|
inoreabbrev <expr> __
|
|
\ <SID>isAtStartOfLine('__') ?
|
|
\ '<c-o>:silent! TableModeDisable<cr>' : '__'
|
|
]]
|
|
|
|
require'plugins.lualine'
|
|
require'plugins.nvim-treesitter'
|
|
require'plugins.nvim-cmp'
|
|
require'plugins.telescope'
|
|
|
|
require'Comment'.setup()
|
|
require'nvim-tree'.setup()
|
|
require'indent_blankline'.setup{
|
|
show_current_context = true,
|
|
}
|
|
require'nvim-web-devicons'.setup{
|
|
color_icons = true;
|
|
default = true;
|
|
}
|
|
-- setup barbar
|
|
require'bufferline'.setup{
|
|
icons = true,
|
|
}
|
|
|
|
require'zen-mode'.setup{
|
|
window = {
|
|
width = 85,
|
|
},
|
|
plugins = {
|
|
options = {
|
|
enabled = true,
|
|
},
|
|
kitty = {
|
|
enabled = true,
|
|
font = "+4",
|
|
},
|
|
},
|
|
}
|
|
require'twilight'.setup{
|
|
dimming = {
|
|
alpha = 0.80,
|
|
},
|
|
}
|