aboutsummaryrefslogtreecommitdiff
path: root/.config/nvim/lua
diff options
context:
space:
mode:
authorXander Swan <email>2025-12-03 10:00:41 -0500
committerXander Swan <email>2025-12-03 10:00:41 -0500
commit7cca5541771ce99ff88279583906693007feb0e8 (patch)
tree6c9cb0fb2f0f5fb2fe1e7faa473b4a8c6eafe1b0 /.config/nvim/lua
parent61cfbe924b31349f5958cc7faa2d6debad5759d9 (diff)
Pasta
Diffstat (limited to '.config/nvim/lua')
-rw-r--r--.config/nvim/lua/map.lua12
-rw-r--r--.config/nvim/lua/plugin/lsp.lua21
-rw-r--r--.config/nvim/lua/plugin/neogen.lua19
-rw-r--r--.config/nvim/lua/plugin/nvimtree.lua2
-rw-r--r--.config/nvim/lua/plugin/packer.lua56
-rw-r--r--.config/nvim/lua/plugin/presence.lua20
-rw-r--r--.config/nvim/lua/plugin/setup.lua7
7 files changed, 86 insertions, 51 deletions
diff --git a/.config/nvim/lua/map.lua b/.config/nvim/lua/map.lua
index b72dcba..f23b703 100644
--- a/.config/nvim/lua/map.lua
+++ b/.config/nvim/lua/map.lua
@@ -1,9 +1,8 @@
vim.keymap.set("i", "jk", "<escape>", {})
--- vim.keymap.set("n", "<leader>n", [[:NvimTreeToggle<cr>]], {})
-vim.keymap.set("n", "<leader>n", [[:Ex<cr>]], {})
-vim.keymap.set("n", "<leader>g", [[:Git<cr>]], {})
-vim.keymap.set("n", "<leader>c", [[:noh<cr>]], {})
-vim.keymap.set("n", "<leader>e", [[:TroubleToggle<cr>]])
+vim.keymap.set("n", "<leader>n", [[:NvimTreeToggle<CR>]], {})
+vim.keymap.set("n", "<leader>g", [[:Git<CR>]], {})
+vim.keymap.set("n", "<leader>c", [[:noh<CR>]], {})
+vim.keymap.set("n", "<leader>e", [[:TroubleToggle<CR>]])
vim.keymap.set("n", "<C-h>", "<C-w>h", {})
vim.keymap.set("n", "<C-j>", "<C-w>j", {})
@@ -25,3 +24,6 @@ vim.keymap.set("o", "ac", "a<", {})
vim.keymap.set({ "n", "v" }, "<leader>y", "\"+y", {})
vim.keymap.set({ "n", "v" }, "<leader>v", "\"_", {})
+
+vim.keymap.set("n", "<up>", "<nop>", { noremap = true })
+vim.keymap.set("n", "<down>", "<nop>", { noremap = true })
diff --git a/.config/nvim/lua/plugin/lsp.lua b/.config/nvim/lua/plugin/lsp.lua
index 1545519..88d5c91 100644
--- a/.config/nvim/lua/plugin/lsp.lua
+++ b/.config/nvim/lua/plugin/lsp.lua
@@ -13,6 +13,15 @@ lsp.ensure_installed {
lspconfig.gdscript.setup {}
+lspconfig.omnisharp.setup {
+ cmd = {
+ "/usr/bin/omnisharp",
+ "--languageserver",
+ "--hostPID",
+ tostring(vim.fn.getpid())
+ }
+}
+
local cmp = require("cmp")
local cmp_select = { behavior = cmp.SelectBehavior.Select }
local cmp_mappings = lsp.defaults.cmp_mappings {
@@ -27,19 +36,17 @@ lsp.setup_nvim_cmp {
}
lsp.set_preferences {
- suggest_lsp_servers = false,
- sign_icons = {
- error = "E",
- warn = "W",
- hint = "H",
- info = "I",
- }
}
lsp.on_attach(function(_, buffer)
local opts = { buffer=buffer, remap=false }
vim.keymap.set("n", "<leader>ld", function() vim.lsp.buf.definition() end, opts)
+ vim.keymap.set("n", "<leader>h", function() vim.lsp.buf.hover() end, opts)
+ vim.keymap.set("n", "<leader>la", function() vim.lsp.buf.code_action() end, opts)
+ vim.keymap.set("n", "<leader>lrf", function() vim.lsp.buf.references() end, opts)
+ vim.keymap.set("n", "<leader>lrn", function() vim.lsp.buf.rename() end, opts)
+ vim.keymap.set("n", "<leader>ls", function() vim.lsp.buf.signature_help() end, opts)
end)
lsp.setup()
diff --git a/.config/nvim/lua/plugin/neogen.lua b/.config/nvim/lua/plugin/neogen.lua
new file mode 100644
index 0000000..512af71
--- /dev/null
+++ b/.config/nvim/lua/plugin/neogen.lua
@@ -0,0 +1,19 @@
+local neogen = require("neogen")
+
+neogen.setup {
+ snippet_engine = "luasnip",
+ languages = {
+ cs = {
+ template = {
+ annotation_convention = "xmldoc",
+ },
+ },
+ },
+}
+
+local opts = {
+ silent = true,
+}
+
+vim.keymap.set("n", "<leader>df", ":Neogen<CR>", opts)
+
diff --git a/.config/nvim/lua/plugin/nvimtree.lua b/.config/nvim/lua/plugin/nvimtree.lua
new file mode 100644
index 0000000..ae388f6
--- /dev/null
+++ b/.config/nvim/lua/plugin/nvimtree.lua
@@ -0,0 +1,2 @@
+require("nvim-tree").setup {
+}
diff --git a/.config/nvim/lua/plugin/packer.lua b/.config/nvim/lua/plugin/packer.lua
index 03b5906..19265c8 100644
--- a/.config/nvim/lua/plugin/packer.lua
+++ b/.config/nvim/lua/plugin/packer.lua
@@ -1,11 +1,11 @@
return require("packer").startup(function(use)
- use 'wbthomason/packer.nvim'
- use 'christoomey/vim-tmux-navigator'
+ use "wbthomason/packer.nvim"
+ use "christoomey/vim-tmux-navigator"
use {
- "kyazdani42/nvim-tree.lua",
- requires = "kyazdani42/nvim-web-devicons"
- }
+ "nvim-tree/nvim-tree.lua",
+ requires = "kyazdani42/nvim-web-devicons"
+ }
use {
"nvim-telescope/telescope.nvim",
@@ -23,8 +23,20 @@ return require("packer").startup(function(use)
}
}
+ use {
+ "utilyre/barbecue.nvim",
+ tag = "*",
+ requires = {
+ "SmiteshP/nvim-navic",
+ "nvim-tree/nvim-web-devicons", -- optional dependency
+ },
+ after = "nvim-web-devicons", -- keep this if you're using NvChad
+ config = function()
+ require("barbecue").setup()
+ end,
+ }
+
use { "tpope/vim-fugitive" }
- use { "weedatom/presence.nvim" }
use { "mhinz/vim-startify" }
use { "DanilaMihailov/beacon.nvim" }
use {
@@ -35,27 +47,29 @@ return require("packer").startup(function(use)
use { "HiPhish/nvim-ts-rainbow2" }
use {
- 'VonHeikemen/lsp-zero.nvim',
+ "VonHeikemen/lsp-zero.nvim",
requires = {
-- LSP Support
- {'neovim/nvim-lspconfig'},
- {'williamboman/mason.nvim'},
- {'williamboman/mason-lspconfig.nvim'},
+ {"neovim/nvim-lspconfig"},
+ {"williamboman/mason.nvim"},
+ {"williamboman/mason-lspconfig.nvim"},
-- Autocompletion
- {'hrsh7th/nvim-cmp'},
- {'hrsh7th/cmp-buffer'},
- {'hrsh7th/cmp-path'},
- {'saadparwaiz1/cmp_luasnip'},
- {'hrsh7th/cmp-nvim-lsp'},
- {'hrsh7th/cmp-nvim-lua'},
+ {"hrsh7th/nvim-cmp"},
+ {"hrsh7th/cmp-buffer"},
+ {"hrsh7th/cmp-path"},
+ {"saadparwaiz1/cmp_luasnip"},
+ {"hrsh7th/cmp-nvim-lsp"},
+ {"hrsh7th/cmp-nvim-lua"},
-- Snippets
- {'L3MON4D3/LuaSnip'},
- {'rafamadriz/friendly-snippets'},
+ {"L3MON4D3/LuaSnip"},
+ {"rafamadriz/friendly-snippets"},
}
}
+ use { "kosayoda/nvim-lightbulb" }
+
use { "michaeljsmith/vim-indent-object" }
use {
@@ -69,6 +83,12 @@ return require("packer").startup(function(use)
"nvim-treesitter/nvim-treesitter",
run = ":TSUpdate"
}
+
+ use {
+ "danymat/neogen",
+ requires = "nvim-treesitter/nvim-treesitter"
+ }
+
use("nvim-treesitter/playground")
end)
diff --git a/.config/nvim/lua/plugin/presence.lua b/.config/nvim/lua/plugin/presence.lua
deleted file mode 100644
index cd36909..0000000
--- a/.config/nvim/lua/plugin/presence.lua
+++ /dev/null
@@ -1,20 +0,0 @@
-require("presence").setup {
- auto_update = true,
- neovim_image_text = "Neovim",
- main_image = "neovim",
- log_level = nil,
- debounce_timeout = 10,
- enable_line_number = false,
- blacklist = {},
- buttons = true,
- file_assets = {},
- show_time = true,
-
- editing_text = "Editing %s",
- file_explorer_text = "Browsing %s",
- git_commit_text = "Committing changes",
- plugin_manager_text = "Managing plugins",
- reading_text = "Reading %s",
- workspace_text = "Working on %s",
- line_number_text = "Line %s out of %s",
-}
diff --git a/.config/nvim/lua/plugin/setup.lua b/.config/nvim/lua/plugin/setup.lua
index 018ed01..d5cca00 100644
--- a/.config/nvim/lua/plugin/setup.lua
+++ b/.config/nvim/lua/plugin/setup.lua
@@ -1,9 +1,14 @@
--- require("nvim-tree").setup {}
+
require("Comment").setup {}
+require("nvim-lightbulb").setup({
+ autocmd = { enabled = true }
+})
+require("plugin.nvimtree")
require("plugin.treesitter")
require("plugin.presence")
require("plugin.telescope")
require("plugin.autopairs")
require("plugin.lualine")
require("plugin.lsp")
+require("plugin.neogen")