Skip to content

Commit 22f4cb2

Browse files
committed
added: discord rich presence, custom plugins, drools lsp
1 parent 1924440 commit 22f4cb2

3 files changed

Lines changed: 38 additions & 6 deletions

File tree

ftplugin/java.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
--jdtls.start_or_attach(config)
2727
local jdtls = require 'jdtls'
2828

29-
local root_dir = require('jdtls.setup').find_root { '.git', 'pom.xml', 'build.gradle' }
29+
local root_dir = require('jdtls.setup').find_root { '.git', 'pom.xml', '.project', 'build.gradle' }
3030
if root_dir == '' then
3131
root_dir = vim.fn.getcwd()
3232
end

init.lua

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ vim.o.showmode = false
118118
-- Remove this option if you want your OS clipboard to remain independent.
119119
-- See `:help 'clipboard'`
120120
vim.schedule(function()
121+
vim.opt.clipboard:append 'unnamedplus'
121122
vim.o.clipboard = 'unnamedplus'
122123
end)
123124

@@ -208,6 +209,15 @@ vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper win
208209
-- vim.keymap.set("n", "<C-S-j>", "<C-w>J", { desc = "Move window to the lower" })
209210
-- vim.keymap.set("n", "<C-S-k>", "<C-w>K", { desc = "Move window to the upper" })
210211

212+
vim.keymap.set('n', '<F5>', function()
213+
require('jdtls').setup_dap { hotcodereplace = 'auto' }
214+
--require('dapui').open()
215+
require('dap').continue()
216+
end, { buffer = true })
217+
218+
vim.keymap.set('n', '<leader>du', function()
219+
require('dapui').toggle()
220+
end, { desc = 'Open/close DAP UI' })
211221
-- [[ Basic Autocommands ]]
212222
-- See `:help lua-guide-autocommands`
213223

@@ -251,6 +261,7 @@ rtp:prepend(lazypath)
251261
require('lazy').setup({
252262
spec = {
253263
{ import = 'kickstart.plugins' },
264+
{ import = 'custom.plugins' },
254265
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
255266
'NMAC427/guess-indent.nvim', -- Detect tabstop and shiftwidth automatically
256267

@@ -259,6 +270,13 @@ require('lazy').setup({
259270
-- keys can be used to configure plugin behavior/loading/etc.
260271
--
261272
-- Use `opts = {}` to automatically pass options to a plugin's `setup()` function, forcing the plugin to be loaded.
273+
{
274+
'vyfor/cord.nvim',
275+
---@type CordConfig
276+
opts = {
277+
-- ...
278+
},
279+
},
262280
{
263281
'fatih/vim-go',
264282
build = ':GoInstallBinaries',
@@ -686,6 +704,7 @@ require('lazy').setup({
686704
-- - settings (table): Override the default settings passed when initializing the server.
687705
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
688706
local servers = {
707+
--drools_lsp = {},
689708
-- clangd = {},
690709
-- gopls = {},
691710
-- pyright = {},
@@ -728,10 +747,20 @@ require('lazy').setup({
728747
--
729748
-- You can add other tools here that you want Mason to install
730749
-- for you, so that they are available from within Neovim.
750+
--local ensure_installed = vim.tbl_keys(servers or {})
751+
--vim.list_extend(ensure_installed, {
752+
-- 'stylua', -- Used to format Lua code
753+
--})
754+
731755
local ensure_installed = vim.tbl_keys(servers or {})
732-
vim.list_extend(ensure_installed, {
733-
'stylua', -- Used to format Lua code
734-
})
756+
757+
-- Remove servers that Mason doesn't manage
758+
ensure_installed = vim.tbl_filter(function(name)
759+
return name ~= 'drools_lsp'
760+
end, ensure_installed)
761+
762+
vim.list_extend(ensure_installed, { 'stylua' })
763+
735764
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
736765

737766
require('mason-lspconfig').setup {
@@ -1004,7 +1033,7 @@ require('lazy').setup({
10041033
-- This is the easiest way to modularize your config.
10051034
--
10061035
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
1007-
-- { import = 'custom.plugins' },
1036+
--{ import = 'custom.plugins' },
10081037
--
10091038
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
10101039
-- Or use telescope!

lua/custom/plugins/init.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
-- I promise not to create any merge conflicts in this directory :)
33
--
44
-- See the kickstart.nvim README for more information
5-
return {}
5+
return {
6+
require 'custom.plugins.drools',
7+
require 'custom.plugins.drools-lsp',
8+
}

0 commit comments

Comments
 (0)