51 lines
1.6 KiB
Lua
51 lines
1.6 KiB
Lua
-------------
|
|
-- plugins --
|
|
-------------
|
|
require "paq" {
|
|
"savq/paq-nvim"; -- Let Paq manage itself
|
|
"nvim-lualine/lualine.nvim";
|
|
{ 'kyazdani42/nvim-web-devicons', opt=true };
|
|
|
|
'neovim/nvim-lspconfig'; -- Configs for Nvim LSP
|
|
'hrsh7th/nvim-cmp'; -- Autocompletion plugin
|
|
'hrsh7th/cmp-nvim-lsp'; -- LSP source for nvim-cmp
|
|
|
|
'L3MON4D3/LuaSnip'; -- Snippets plugin
|
|
'saadparwaiz1/cmp_luasnip'; -- Snippets source for nvim-cmp
|
|
|
|
'nvim-treesitter/nvim-treesitter'; -- Better syntax highlighting
|
|
|
|
'windwp/nvim-autopairs';
|
|
'tpope/vim-surround';
|
|
'dhruvasagar/vim-table-mode';
|
|
'lukas-reineke/indent-blankline.nvim';
|
|
|
|
'ap/vim-css-color';
|
|
'rebelot/kanagawa.nvim';
|
|
'folke/tokyonight.nvim';
|
|
--'elkowar/yuck.vim';
|
|
}
|
|
|
|
-- 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'indent_blankline'.setup{
|
|
show_current_context = true,
|
|
}
|