This commit is contained in:
cool-mist
2024-02-16 15:23:45 +05:30
parent 72ae86a361
commit d3d59de537
+57 -56
View File
@@ -9,6 +9,7 @@ O.number=true
O.relativenumber=true O.relativenumber=true
O.tabstop=2 O.tabstop=2
O.shiftwidth=2 O.shiftwidth=2
O.expandtab=true
O.preserveindent=true O.preserveindent=true
O.termguicolors=true O.termguicolors=true
V.cmd("colorscheme habamax") V.cmd("colorscheme habamax")
@@ -26,20 +27,20 @@ V.g.mapleader = " "
--- 3 --- Packer conf ---- --- 3 --- Packer conf ----
-------------------------- --------------------------
local fresh_install_packer = function() local fresh_install_packer = function()
local packerpath = V.fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim" local packerpath = V.fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
if not V.loop.fs_stat(packerpath) then if not V.loop.fs_stat(packerpath) then
V.fn.system({ V.fn.system({
"git", "git",
"clone", "clone",
"--depth", "--depth",
"1", "1",
"https://github.com/wbthomason/packer.nvim.git", "https://github.com/wbthomason/packer.nvim.git",
packerpath, packerpath,
}) })
V.cmd [[packadd packer.nvim]] V.cmd [[packadd packer.nvim]]
return true return true
end end
return false return false
end end
local fresh_install = fresh_install_packer(); local fresh_install = fresh_install_packer();
@@ -60,47 +61,47 @@ local packer = require('packer')
packer.startup(function(u) packer.startup(function(u)
u 'wbthomason/packer.nvim' u 'wbthomason/packer.nvim'
-- LSP + Autocomplete -- LSP + Autocomplete
u 'neovim/nvim-lspconfig' u 'neovim/nvim-lspconfig'
u 'williamboman/mason.nvim' u 'williamboman/mason.nvim'
u 'williamboman/mason-lspconfig.nvim' u 'williamboman/mason-lspconfig.nvim'
u 'hrsh7th/nvim-cmp' u 'hrsh7th/nvim-cmp'
u 'hrsh7th/cmp-nvim-lsp' u 'hrsh7th/cmp-nvim-lsp'
u 'hrsh7th/cmp-buffer' u 'hrsh7th/cmp-buffer'
u 'L3MON4D3/LuaSnip' u 'L3MON4D3/LuaSnip'
u 'Sirver/ultisnips' u 'Sirver/ultisnips'
u 'honza/vim-snippets' u 'honza/vim-snippets'
u { u {
'VonHeikemen/lsp-zero.nvim', 'VonHeikemen/lsp-zero.nvim',
branch = 'v2.x' branch = 'v2.x'
} }
-- Markdown -- Markdown
u 'godlygeek/tabular' u 'godlygeek/tabular'
u 'elzr/vim-json' u 'elzr/vim-json'
u 'preservim/vim-markdown' u 'preservim/vim-markdown'
u 'vim-pandoc/vim-pandoc-syntax' u 'vim-pandoc/vim-pandoc-syntax'
u ({ "iamcco/markdown-preview.nvim", run = "cd app && npm install", setup = function() V.g.mkdp_filetypes = { "markdown.pandoc" } end, ft = { "markdown" }, }) u ({ "iamcco/markdown-preview.nvim", run = "cd app && npm install", setup = function() V.g.mkdp_filetypes = { "markdown.pandoc" } end, ft = { "markdown" }, })
-- File tree, telescope -- File tree, telescope
u 'nvim-lua/plenary.nvim' u 'nvim-lua/plenary.nvim'
u 'nvim-tree/nvim-web-devicons' u 'nvim-tree/nvim-web-devicons'
u 'MunifTanjim/nui.nvim' u 'MunifTanjim/nui.nvim'
u { u {
'nvim-neo-tree/neo-tree.nvim', 'nvim-neo-tree/neo-tree.nvim',
branch = 'v3.x' branch = 'v3.x'
} }
u { u {
'nvim-telescope/telescope.nvim', 'nvim-telescope/telescope.nvim',
branch = '0.1.x' branch = '0.1.x'
} }
-- Others -- Others
u 'nvim-lualine/lualine.nvim' u 'nvim-lualine/lualine.nvim'
u 'folke/which-key.nvim' u 'folke/which-key.nvim'
if fresh_install then if fresh_install then
packer.sync() packer.sync()
end end
end) end)
-------------------------- --------------------------
@@ -114,7 +115,7 @@ lsp.on_attach(function(client, bufnr)
end) end)
lsp.ensure_installed({ lsp.ensure_installed({
'lua_ls', 'lua_ls',
'tsserver', 'tsserver',
'eslint', 'eslint',
'rust_analyzer' 'rust_analyzer'
@@ -137,11 +138,11 @@ cmp.setup {
}, },
sources = { sources = {
{name = 'buffer'}, {name = 'buffer'},
{name = 'nvim_lsp'} {name = 'nvim_lsp'}
}, },
completion = { completion = {
completeopt = 'menu,menuone,noinsert' completeopt = 'menu,menuone,noinsert'
} }
} }
@@ -150,9 +151,9 @@ telescope.setup();
local lualine = require('lualine') local lualine = require('lualine')
lualine.setup({ lualine.setup({
options = { options = {
theme = 'nord' theme = 'nord'
} }
}); });
local whichkey = require('which-key') local whichkey = require('which-key')
@@ -168,15 +169,15 @@ V.cmd('let g:vim_markdown_toml_frontmatter = 1')
V.cmd('let g:vim_markdown_json_frontmatter = 1') V.cmd('let g:vim_markdown_json_frontmatter = 1')
V.cmd([[ V.cmd([[
augroup pandoc_syntax augroup pandoc_syntax
au! BufNewFile,BufFilePre,BufRead *.md set filetype=markdown.pandoc au! BufNewFile,BufFilePre,BufRead *.md set filetype=markdown.pandoc
augroup END augroup END
]]) ]])
V.cmd([[ V.cmd([[
augroup pandoc_syntax augroup pandoc_syntax
au! BufNewFile,BufFilePre,BufRead *.markdown set filetype=markdown.pandoc au! BufNewFile,BufFilePre,BufRead *.markdown set filetype=markdown.pandoc
augroup END augroup END
]]) ]])
-------------------------- --------------------------