added lsp, formatter debugger etc
This commit is contained in:
parent
e281c2392a
commit
ee00d818be
5
.config/nvim/.luarc.json
Normal file
5
.config/nvim/.luarc.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"diagnostics.globals": [
|
||||
"vim"
|
||||
]
|
||||
}
|
@ -1,18 +1,15 @@
|
||||
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
|
||||
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',
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable",
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require('vim-options')
|
||||
require('lazy').setup('plugins')
|
||||
|
||||
|
||||
|
||||
require("vim-options")
|
||||
require("lazy").setup("plugins")
|
||||
|
@ -1,11 +1,26 @@
|
||||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "0f7bbce41ea152a94d12aea286f2ce98e63c0f58" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "de72250e054e5e691b9736ee30db72c65d560771" },
|
||||
"catppuccin": { "branch": "main", "commit": "faf15ab0201b564b6368ffa47b56feefc92ce3f4" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "56ead98e05bb37a4ec28930a54d836d033cf00f2" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "43894adcf10bb1190c2184bd7c1750e8ea2b3dce" },
|
||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" },
|
||||
"none-ls-extras.nvim": { "branch": "main", "commit": "f50d4dece9f91813f049f8100d188933f7d654d9" },
|
||||
"none-ls.nvim": { "branch": "main", "commit": "1f2bf17eddfdd45aed254b6922c6c68b933dba9e" },
|
||||
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "ed31156aa2cc14e3bc066c59357cc91536a2bc01" },
|
||||
"nvim-dap": { "branch": "master", "commit": "cc92b054720a96170eca6bd9bdedd43d2b0a7a8a" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "ffa89839f97bad360e78428d5c740fdad9a0ff02" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "dafd61d6533bd90ecf6e2a3a972298fdddc74d82" },
|
||||
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "d14bc4bd15a7b9b5a9e7977c6a28f2cab6c4ad4a" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "edbe0a65cfacbbfff6a4a1e98ddd60c28c560509" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }
|
||||
}
|
||||
|
31
.config/nvim/lua/plugins/alpha.lua
Normal file
31
.config/nvim/lua/plugins/alpha.lua
Normal file
@ -0,0 +1,31 @@
|
||||
return {
|
||||
"goolord/alpha-nvim",
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
|
||||
config = function()
|
||||
local alpha = require("alpha")
|
||||
local dashboard = require("alpha.themes.startify")
|
||||
|
||||
dashboard.section.header.val = {
|
||||
[[ ]],
|
||||
[[ ]],
|
||||
[[ ]],
|
||||
[[ ]],
|
||||
[[ ]],
|
||||
[[ ████ ██████ █████ ██ ]],
|
||||
[[ ███████████ █████ ]],
|
||||
[[ █████████ ███████████████████ ███ ███████████ ]],
|
||||
[[ █████████ ███ █████████████ █████ ██████████████ ]],
|
||||
[[ █████████ ██████████ █████████ █████ █████ ████ █████ ]],
|
||||
[[ ███████████ ███ ███ █████████ █████ █████ ████ █████ ]],
|
||||
[[ ██████ █████████████████████ ████ █████ █████ ████ ██████ ]],
|
||||
[[ ]],
|
||||
[[ ]],
|
||||
[[ ]],
|
||||
}
|
||||
|
||||
alpha.setup(dashboard.opts)
|
||||
end,
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
return {
|
||||
'catppuccin/nvim',
|
||||
return {
|
||||
"catppuccin/nvim",
|
||||
lazy = false,
|
||||
name = 'catppuccin',
|
||||
name = "catppuccin",
|
||||
priority = 1000,
|
||||
config = function()
|
||||
vim.cmd.colorscheme 'catppuccin'
|
||||
end
|
||||
vim.cmd.colorscheme("catppuccin")
|
||||
end,
|
||||
}
|
||||
|
44
.config/nvim/lua/plugins/completions.lua
Normal file
44
.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 }),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
}, {
|
||||
{ name = "buffer" },
|
||||
}),
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
26
.config/nvim/lua/plugins/debugging.lua
Normal file
26
.config/nvim/lua/plugins/debugging.lua
Normal file
@ -0,0 +1,26 @@
|
||||
return {
|
||||
"mfussenegger/nvim-dap",
|
||||
dependencies = {
|
||||
"rcarriga/nvim-dap-ui",
|
||||
"nvim-neotest/nvim-nio",
|
||||
},
|
||||
config = function()
|
||||
local dap, dapui = require("dap"), require("dapui")
|
||||
|
||||
dap.listeners.before.attach.dapui_config = function()
|
||||
dapui.open()
|
||||
end
|
||||
dap.listeners.before.launch.dapui_config = function()
|
||||
dapui.open()
|
||||
end
|
||||
dap.listeners.before.event_terminated.dapui_config = function()
|
||||
dapui.close()
|
||||
end
|
||||
dap.listeners.before.event_exited.dapui_config = function()
|
||||
dapui.close()
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "<Leader>dt", dap.toggle_breakpoint, {})
|
||||
vim.keymap.set("n", "<Leader>dc", dap.continue, {})
|
||||
end,
|
||||
}
|
39
.config/nvim/lua/plugins/lsp-config.lua
Normal file
39
.config/nvim/lua/plugins/lsp-config.lua
Normal file
@ -0,0 +1,39 @@
|
||||
return {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("mason").setup()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
lazy = false,
|
||||
opts = {
|
||||
auto_install = true,
|
||||
},
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
lazy = false,
|
||||
config = function()
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
local lspconfig = require("lspconfig")
|
||||
lspconfig.lua_ls.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
lspconfig.ts_ls.setup({
|
||||
capabilities = capabilities
|
||||
})
|
||||
lspconfig.rust_analyzer.setup({
|
||||
capabilities = capabilities
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, {})
|
||||
vim.keymap.set("n", "<leader>gd", vim.lsp.buf.definition, {})
|
||||
vim.keymap.set("n", "<leader>gr", vim.lsp.buf.references, {})
|
||||
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, {})
|
||||
end,
|
||||
},
|
||||
}
|
@ -1,14 +1,13 @@
|
||||
return {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
"nvim-lualine/lualine.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'auto',
|
||||
component_seperator = '|',
|
||||
section_separators = { left = '', right = '' },
|
||||
}
|
||||
}
|
||||
theme = "auto",
|
||||
component_seperator = "|",
|
||||
section_separators = { left = "", right = "" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -1,13 +1,12 @@
|
||||
return {
|
||||
'nvim-neo-tree/neo-tree.nvim',
|
||||
branch = 'v3.x',
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
branch = "v3.x",
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
'MunifTanjim/nui.nvim',
|
||||
"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>', {})
|
||||
end
|
||||
vim.keymap.set("n", "<C-n>", ":Neotree filesystem reveal left<CR>", {})
|
||||
end,
|
||||
}
|
||||
|
||||
|
19
.config/nvim/lua/plugins/none-ls.lua
Normal file
19
.config/nvim/lua/plugins/none-ls.lua
Normal file
@ -0,0 +1,19 @@
|
||||
return {
|
||||
"nvimtools/none-ls.nvim",
|
||||
dependencies = {
|
||||
"nvimtools/none-ls-extras.nvim"
|
||||
},
|
||||
config = function()
|
||||
local null_ls = require("null-ls")
|
||||
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
null_ls.builtins.formatting.stylua,
|
||||
null_ls.builtins.formatting.prettier,
|
||||
require("none-ls.diagnostics.eslint"),
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>gf", vim.lsp.buf.format, {})
|
||||
end,
|
||||
}
|
@ -1,9 +1,26 @@
|
||||
b {
|
||||
'nvim-telescope/telescope.nvim', tag = '0.1.5',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
config = function()
|
||||
local builtin = require('telescope.builtin')
|
||||
vim.keymap.set('n', '<C-p>', builtin.find_files, {})
|
||||
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {}) -- ripgrep is needed for this to work
|
||||
end
|
||||
return {
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
tag = "0.1.5",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
config = function()
|
||||
local builtin = require("telescope.builtin")
|
||||
vim.keymap.set("n", "<C-p>", builtin.find_files, {})
|
||||
vim.keymap.set("n", "<leader>fg", builtin.live_grep, {}) -- ripgrep is needed for this to work
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope-ui-select.nvim",
|
||||
config = function()
|
||||
require("telescope").setup({
|
||||
extentsions = {
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown({}),
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
require("telescope").load_extension("ui-select")
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
@ -1,12 +1,12 @@
|
||||
return {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
build = ':TSUpdate',
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
local config = require('nvim-treesitter.configs')
|
||||
local config = require("nvim-treesitter.configs")
|
||||
config.setup({
|
||||
ensure_installed = { 'lua', 'javascript', 'typescript', 'rust' },
|
||||
auto_install = true,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true }
|
||||
indent = { enable = true },
|
||||
})
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
@ -1,7 +1,10 @@
|
||||
vim.cmd('set expandtab')
|
||||
vim.cmd('set tabstop=2')
|
||||
vim.cmd('set softtabstop=2')
|
||||
vim.cmd('set shiftwidth=2')
|
||||
vim.g.mapleader = ' '
|
||||
vim.cmd("set expandtab")
|
||||
vim.cmd("set tabstop=2")
|
||||
vim.cmd("set softtabstop=2")
|
||||
vim.cmd("set shiftwidth=2")
|
||||
vim.g.mapleader = " "
|
||||
vim.g.backgrounf = "light"
|
||||
|
||||
vim.opt.swapfile = false
|
||||
|
||||
vim.wo.number = true
|
||||
|
Loading…
Reference in New Issue
Block a user