Skip to content

Commit

Permalink
Add custom config and README
Browse files Browse the repository at this point in the history
  • Loading branch information
haney-oliver committed Apr 23, 2024
1 parent e09854d commit ff36c24
Show file tree
Hide file tree
Showing 8 changed files with 190 additions and 675 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
plugin
custom
spell
ftplugin
syntax
Expand Down
674 changes: 0 additions & 674 deletions LICENSE

This file was deleted.

7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# nvchad config

## Installation
```bash
mv ~/.config/nvim ~/.config/nvim-backup/
git clone git@github.com:haney-oliver/nvim-config.git ~/.config/nvim
```
8 changes: 8 additions & 0 deletions lua/custom/chadrc.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---@type ChadrcConfig
local M = {}

M.ui = { theme = 'doomchad' }
M.plugins = "custom.plugins"
M.mappings = require "custom.mappings"

return M
12 changes: 12 additions & 0 deletions lua/custom/configs/lspconfig.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
local config = require("plugins.configs.lspconfig")

local on_attach = config.on_attach
local capabilities = config.capabilities

local lspconfig = require("lspconfig")

lspconfig.basedpyright.setup({
on_attach = on_attach,
capabilities = capabilities,
filetypes = {"python"}
})
1 change: 1 addition & 0 deletions lua/custom/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vim.opt.conceallevel=1
42 changes: 42 additions & 0 deletions lua/custom/mappings.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
local M = {}

M.dap = {
plugin = true,
n = {
["<leader>db"] = {"<cmd> DapToggleBreakpoint <CR>"}
}
}

M.dap_python = {
plugin = true,
n = {
["<leader>dpr"] = {
function()
require('dap-python').test_method()
end
}
}
}

M.dap_ui = {
plugin = true,
n = {
["<leader>dpt"] = {
function ()
require('dapui').toggle()
end
}
}
}

M.general = {
t = {
-- navigate within terminal mode
["<C-h>"] = { "<Left>", "Move left" },
["<C-l>"] = { "<Right>", "Move right" },
["<C-j>"] = { "<Down>", "Move down" },
["<C-k>"] = { "<Up>", "Move up" },
}
}

return M
120 changes: 120 additions & 0 deletions lua/custom/plugins.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
local plugins = {
{
"williamboman/mason.nvim",
opts = {
ensure_installed = {
"basedpyright",
"debugpy"
}
}
},
-- {
-- "christoomey/vim-tmux-navigator",
-- lazy = false,
-- cmd = {
-- "TmuxNavigateLeft",
-- "TmuxNavigateDown",
-- "TmuxNavigateUp",
-- "TmuxNavigateRight",
-- "TmuxNavigatePrevious",
-- },
-- keys = {
-- { "<c-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" },
-- { "<c-j>", "<cmd><C-U>TmuxNavigateDown<cr>" },
-- { "<c-k>", "<cmd><C-U>TmuxNavigateUp<cr>" },
-- { "<c-l>", "<cmd><C-U>TmuxNavigateRight<cr>" },
-- { "<c-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" },
-- },
-- },
{
"neovim/nvim-lspconfig",
config = function()
require "plugins.configs.lspconfig"
require "custom.configs.lspconfig"
end
},
{
"mfussenegger/nvim-dap",
config = function(_)
require("core.utils").load_mappings("dap")
end
},
{ "nvim-neotest/nvim-nio" },
{
"rcarriga/nvim-dap-ui",
dependencies = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" },
config = function()
local dap = require("dap")
local dapui = require("dapui")
require('core.utils').load_mappings("dap_ui")
dapui.setup()
dap.listeners.after.event_initialized["dapui_config"] = function()
dapui.open()
end
dap.listeners.before.event_initialized["dapui_config"] = function()
dapui.close()
end
dap.listeners.before.event_exited["dapui_config"] = function()
dapui.close()
end
end
},
{
"mfussenegger/nvim-dap-python",
ft = "python",
dependencies = {
"mfussenegger/nvim-dap",
"rcarriga/nvim-dap-ui"
},
config = function()
local path = "~/.local/share/nvim/mason/packages/debugpy/venv/bin/python"
require("dap-python").setup(path)
require("core.utils").load_mappings("dap_python")
end,
},
{
"nvim-tree/nvim-tree.lua",
opts = {
git = {
enable = true,
ignore = true,
},
}
},
{
"epwalsh/obsidian.nvim",
version = "*", -- recommended, use latest release instead of latest commit
lazy = true,
ft = "markdown",
-- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault:
-- event = {
-- -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'.
-- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/**.md"
-- "BufReadPre path/to/my-vault/**.md",
-- "BufNewFile path/to/my-vault/**.md",
-- },
dependencies = {
"nvim-lua/plenary.nvim",
},
opts = {
workspaces = {
{
name = "personal",
path = "~/vaults/personal",
},
{
name = "work",
path = "~/vaults/work",
},
},
},
},
{
"nvim-treesitter/nvim-treesitter",
opts = { ensure_installed = { "markdown", "markdown_inline" } }
}
}



return plugins

0 comments on commit ff36c24

Please sign in to comment.