update nvim, change to lazyvim package manager
This commit is contained in:
parent
b950584c54
commit
7450fb5c0f
118 changed files with 240 additions and 14047 deletions
5
nvim/.config/nvim/.luarc.json
Normal file
5
nvim/.config/nvim/.luarc.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"diagnostics.globals": [
|
||||
"vim"
|
||||
]
|
||||
}
|
19
nvim/.config/nvim/init.lua
Normal file
19
nvim/.config/nvim/init.lua
Normal file
|
@ -0,0 +1,19 @@
|
|||
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", -- latest stable release
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require("vim-settings")
|
||||
require("lazy").setup("plugins")
|
||||
|
||||
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
" Get us some plugins
|
||||
call plug#begin("~/.vim/plugged")
|
||||
" Plugin Section
|
||||
Plug 'dracula/vim'
|
||||
Plug 'ryanoasis/vim-devicons'
|
||||
Plug 'scrooloose/nerdtree'
|
||||
call plug#end()
|
||||
|
||||
|
||||
" Show matching
|
||||
set showmatch
|
||||
|
||||
" case insensitive
|
||||
set ignorecase
|
||||
|
||||
" Enable middle mouse click pasting
|
||||
set mouse=v
|
||||
|
||||
" Highlight our search
|
||||
set hlsearch
|
||||
|
||||
" Set columns for tab stop
|
||||
set tabstop=4
|
||||
|
||||
" convert tabs to white spaces
|
||||
set expandtab
|
||||
|
||||
" indent a new line the same amount as the line just typed
|
||||
set autoindent
|
||||
|
||||
" show line numbers
|
||||
set number
|
||||
|
||||
" enable syntax highlighting
|
||||
syntax on
|
||||
|
||||
" use system clipboard
|
||||
set clipboard=unnamedplus
|
||||
|
||||
" highlight current cursorline
|
||||
set cursorline
|
||||
|
||||
" disable creating swap file
|
||||
set noswapfile
|
||||
|
||||
" setup an undofile
|
||||
set undofile
|
21
nvim/.config/nvim/lazy-lock.json
Normal file
21
nvim/.config/nvim/lazy-lock.json
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"LazyVim": { "branch": "main", "commit": "a33eabddd9f3786421652d07894516d946c88647" },
|
||||
"LuaSnip": { "branch": "master", "commit": "50fcf17db7c75af80e6b6109acfbfb4504768780" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||
"dracula.nvim": { "branch": "main", "commit": "8d8bddb8814c3e7e62d80dda65a9876f97eb699c" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "682157939e57bd6a2c86277dfd4d6fbfce63dbac" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "c501b429cf995c645454539b924aaefae45bb9eb" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" },
|
||||
"mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "29f7c215332ba95e470811c380ddbce2cebe2af4" },
|
||||
"nui.nvim": { "branch": "main", "commit": "a2bc1e9d0359caa5d11ad967cd1e30e8d4676226" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "9c9eb07fecc578e25e28db8dc9002b43fff2ed79" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "53881422f600b7837b55d06e7d426bc875bccb90" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" }
|
||||
}
|
9
nvim/.config/nvim/lazyvim.json
Normal file
9
nvim/.config/nvim/lazyvim.json
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"extras": [
|
||||
|
||||
],
|
||||
"news": {
|
||||
"NEWS.md": "6077"
|
||||
},
|
||||
"version": 6
|
||||
}
|
1
nvim/.config/nvim/lua/plugins.lua
Normal file
1
nvim/.config/nvim/lua/plugins.lua
Normal file
|
@ -0,0 +1 @@
|
|||
return {}
|
44
nvim/.config/nvim/lua/plugins/completions.lua
Normal file
44
nvim/.config/nvim/lua/plugins/completions.lua
Normal file
|
@ -0,0 +1,44 @@
|
|||
return {
|
||||
{
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
},
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
dependencies = {
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
"rafamadriz/friendly-snippets"
|
||||
}
|
||||
},
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
config = function()
|
||||
local cmp = require('cmp')
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require('luasnip').lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.abort(),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
--{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' },
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
})
|
||||
})
|
||||
end
|
||||
}
|
||||
}
|
8
nvim/.config/nvim/lua/plugins/dracula.lua
Normal file
8
nvim/.config/nvim/lua/plugins/dracula.lua
Normal file
|
@ -0,0 +1,8 @@
|
|||
return {
|
||||
{ "Mofiqul/dracula.nvim" },
|
||||
{ "LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "dracula",
|
||||
},
|
||||
},
|
||||
}
|
37
nvim/.config/nvim/lua/plugins/lsp-config.lua
Normal file
37
nvim/.config/nvim/lua/plugins/lsp-config.lua
Normal file
|
@ -0,0 +1,37 @@
|
|||
return {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
config = function()
|
||||
require('mason').setup()
|
||||
end
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
config = function()
|
||||
require('mason-lspconfig').setup({
|
||||
ensure_installed = { "lua_ls", "bashls", "gopls", "jsonls", "biome", "zk", "pyre", "rust_analyzer", "sqls", "taplo", "yamlls" }
|
||||
})
|
||||
end
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
local lspconfig = require("lspconfig")
|
||||
lspconfig.lua_ls.setup({ capabilities = capabilities })
|
||||
lspconfig.bashls.setup({ capabilities = capabilities })
|
||||
lspconfig.gopls.setup({ capabilities = capabilities })
|
||||
lspconfig.jsonls.setup({ capabilities = capabilities })
|
||||
lspconfig.biome.setup({ capabilities = capabilities })
|
||||
lspconfig.zk.setup({ capabilities = capabilities })
|
||||
lspconfig.pyre.setup({ capabilities = capabilities })
|
||||
lspconfig.rust_analyzer.setup({ capabilities = capabilities })
|
||||
lspconfig.sqls.setup({ capabilities = capabilities })
|
||||
lspconfig.taplo.setup({ capabilities = capabilities })
|
||||
lspconfig.yamlls.setup({ capabilities = capabilities })
|
||||
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, {})
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, {})
|
||||
end
|
||||
}
|
||||
}
|
13
nvim/.config/nvim/lua/plugins/lualine.lua
Normal file
13
nvim/.config/nvim/lua/plugins/lualine.lua
Normal file
|
@ -0,0 +1,13 @@
|
|||
return {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = {
|
||||
'nvim-tree/nvim-web-devicons'
|
||||
},
|
||||
config = function()
|
||||
require('lualine').setup({
|
||||
options = {
|
||||
theme = 'dracula'
|
||||
}
|
||||
})
|
||||
end
|
||||
}
|
14
nvim/.config/nvim/lua/plugins/neotree.lua
Normal file
14
nvim/.config/nvim/lua/plugins/neotree.lua
Normal file
|
@ -0,0 +1,14 @@
|
|||
return {
|
||||
'nvim-neo-tree/neo-tree.nvim',
|
||||
branch = 'v3.x',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
'MunifTanjim/nui.nvim',
|
||||
},
|
||||
config = function()
|
||||
vim.keymap.set("n", "<C-n>", ":Neotree filesystem reveal left<CR>") -- ctrl + n = show filesystem on left side
|
||||
end
|
||||
}
|
||||
|
||||
|
27
nvim/.config/nvim/lua/plugins/telescope.lua
Normal file
27
nvim/.config/nvim/lua/plugins/telescope.lua
Normal file
|
@ -0,0 +1,27 @@
|
|||
return {
|
||||
{
|
||||
'nvim-telescope/telescope.nvim',
|
||||
tag = '0.1.6',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
config = function ()
|
||||
local builtin = require("telescope.builtin")
|
||||
vim.keymap.set("n", "<C-p>", builtin.find_files, {}) -- ctrl + p = fuzzy file find
|
||||
vim.keymap.set("n", "<leader>fg", builtin.live_grep, {}) -- space + fg = fuzzy grep in files
|
||||
end
|
||||
},
|
||||
{
|
||||
'nvim-telescope/telescope-ui-select.nvim',
|
||||
config = function()
|
||||
require("telescope").setup({
|
||||
extensions = {
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown {}
|
||||
}
|
||||
}
|
||||
})
|
||||
require("telescope").load_extension("ui-select")
|
||||
end
|
||||
}
|
||||
}
|
||||
|
||||
|
15
nvim/.config/nvim/lua/plugins/treesitter.lua
Normal file
15
nvim/.config/nvim/lua/plugins/treesitter.lua
Normal file
|
@ -0,0 +1,15 @@
|
|||
return {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
build = ':TSUpdate',
|
||||
config = function()
|
||||
local config = require("nvim-treesitter.configs")
|
||||
config.setup({
|
||||
ensure_installed = {"lua", "javascript", "go", "toml", "json", "yaml"},
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
})
|
||||
end
|
||||
}
|
||||
|
||||
|
||||
|
5
nvim/.config/nvim/lua/vim-settings.lua
Normal file
5
nvim/.config/nvim/lua/vim-settings.lua
Normal file
|
@ -0,0 +1,5 @@
|
|||
vim.cmd("set expandtab")
|
||||
vim.cmd("set tabstop=2")
|
||||
vim.cmd("set softtabstop=2")
|
||||
vim.cmd("set shiftwidth=2")
|
||||
vim.g.mapleader = " "
|
Loading…
Add table
Add a link
Reference in a new issue