update nvim config
This commit is contained in:
parent
858202caf1
commit
e92fada534
4 changed files with 51 additions and 11 deletions
|
@ -6,6 +6,8 @@ vim.g.loaded_netrwPlugin = 1
|
||||||
----------------------
|
----------------------
|
||||||
local set = vim.opt
|
local set = vim.opt
|
||||||
|
|
||||||
|
set.foldmethod = 'marker'
|
||||||
|
|
||||||
set.wrap = true
|
set.wrap = true
|
||||||
set.linebreak = true
|
set.linebreak = true
|
||||||
set.breakindent = true
|
set.breakindent = true
|
||||||
|
@ -30,15 +32,25 @@ set.tabstop = 4
|
||||||
set.shiftwidth = 4
|
set.shiftwidth = 4
|
||||||
set.softtabstop = 0
|
set.softtabstop = 0
|
||||||
|
|
||||||
local group = vim.api.nvim_create_augroup("WrapMarkdown", { clear = true })
|
local mdgroup = vim.api.nvim_create_augroup("WrapMarkdown", { clear = true })
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
pattern = "markdown,txt",
|
pattern = "markdown,txt",
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.opt_local.colorcolumn = "100"
|
vim.opt_local.colorcolumn = "85"
|
||||||
vim.opt_local.textwidth = 100
|
vim.opt_local.textwidth = 85
|
||||||
end,
|
end,
|
||||||
group = WrapMarkdown,
|
group = WrapMarkdown,
|
||||||
})
|
})
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
pattern = "latex,tex",
|
||||||
|
callback = function()
|
||||||
|
vim.opt_local.shiftwidth = 2
|
||||||
|
vim.opt_local.tabstop = 2
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||||
|
command = "silent! lua vim.highlight.on_yank()",
|
||||||
|
})
|
||||||
|
|
||||||
vim.cmd [[
|
vim.cmd [[
|
||||||
let g:vim_markdown_folding_disabled=1
|
let g:vim_markdown_folding_disabled=1
|
||||||
|
|
|
@ -5,9 +5,10 @@ local map = vim.api.nvim_set_keymap
|
||||||
|
|
||||||
vim.g.mapleader = ' '
|
vim.g.mapleader = ' '
|
||||||
map('n', '<Space>', '', {})
|
map('n', '<Space>', '', {})
|
||||||
map('n', '<Leader>n', '<cmd>:bNext<CR>', {})
|
map('n', '<Leader>n', '<cmd>:bnext<CR>', {})
|
||||||
map('n', '<Leader>p', '<cmd>:bprevious<CR>', {})
|
map('n', '<Leader>p', '<cmd>:bprevious<CR>', {})
|
||||||
map('n', '<Leader>h', '<cmd>:nohlsearch<CR>', {})
|
map('n', '<Leader>h', '<cmd>:nohlsearch<CR>', {})
|
||||||
|
|
||||||
-- nvim-tree mappings
|
-- nvim-tree mappings
|
||||||
map('n', '<Leader>t', '<cmd>:NvimTreeToggle<CR>', {})
|
map('n', '<Leader>t', '<cmd>:NvimTreeToggle<CR>', {})
|
||||||
|
map('n', '<Leader>z', '<cmd>:ZenMode<CR>', {})
|
||||||
|
|
|
@ -2,12 +2,15 @@
|
||||||
-- plugins --
|
-- plugins --
|
||||||
-------------
|
-------------
|
||||||
require "paq" {
|
require "paq" {
|
||||||
"savq/paq-nvim"; -- Let Paq manage itself
|
"savq/paq-nvim"; -- Let Paq manage itself
|
||||||
-- general plugins
|
-- general plugins
|
||||||
"nvim-lualine/lualine.nvim";
|
"nvim-lualine/lualine.nvim";
|
||||||
{ 'kyazdani42/nvim-web-devicons', opt=true };
|
--{ 'nvim-tree/nvim-web-devicons', opt=true };
|
||||||
|
'nvim-tree/nvim-web-devicons';
|
||||||
'romgrk/barbar.nvim';
|
'romgrk/barbar.nvim';
|
||||||
'ggandor/lightspeed.nvim';
|
'ggandor/lightspeed.nvim';
|
||||||
|
'L3MON4D3/LuaSnip'; -- Snippets plugin
|
||||||
|
'saadparwaiz1/cmp_luasnip'; -- Snippets source for nvim-cmp
|
||||||
|
|
||||||
-- colorschemes --
|
-- colorschemes --
|
||||||
'rebelot/kanagawa.nvim';
|
'rebelot/kanagawa.nvim';
|
||||||
|
@ -29,10 +32,10 @@ require "paq" {
|
||||||
'lukas-reineke/indent-blankline.nvim';
|
'lukas-reineke/indent-blankline.nvim';
|
||||||
'ap/vim-css-color';
|
'ap/vim-css-color';
|
||||||
|
|
||||||
'L3MON4D3/LuaSnip'; -- Snippets plugin
|
-- writing
|
||||||
'saadparwaiz1/cmp_luasnip'; -- Snippets source for nvim-cmp
|
|
||||||
|
|
||||||
'dhruvasagar/vim-table-mode';
|
'dhruvasagar/vim-table-mode';
|
||||||
|
'folke/zen-mode.nvim';
|
||||||
|
'folke/twilight.nvim';
|
||||||
}
|
}
|
||||||
|
|
||||||
-- looks like tablemode for vim-table-mode in markdown
|
-- looks like tablemode for vim-table-mode in markdown
|
||||||
|
@ -62,7 +65,31 @@ require'nvim-tree'.setup()
|
||||||
require'indent_blankline'.setup{
|
require'indent_blankline'.setup{
|
||||||
show_current_context = true,
|
show_current_context = true,
|
||||||
}
|
}
|
||||||
|
require'nvim-web-devicons'.setup{
|
||||||
|
color_icons = true;
|
||||||
|
default = true;
|
||||||
|
}
|
||||||
-- setup barbar
|
-- setup barbar
|
||||||
require'bufferline'.setup{
|
require'bufferline'.setup{
|
||||||
icons = false,
|
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,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ cmp.event:on(
|
||||||
|
|
||||||
-- Add additional capabilities supported by nvim-cmp
|
-- Add additional capabilities supported by nvim-cmp
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
|
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
|
||||||
|
|
||||||
local lspconfig = require('lspconfig')
|
local lspconfig = require('lspconfig')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue