diff --git a/ftplugin/java.lua b/ftplugin/java.lua index b1e7a937..7dd724a6 100644 --- a/ftplugin/java.lua +++ b/ftplugin/java.lua @@ -98,10 +98,10 @@ local config = { format = { enabled = true, -- Formatting works by default, but you can refer to a specific file/URL if you choose - -- settings = { - -- url = "https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml", - -- profile = "GoogleStyle", - -- }, + settings = { + path = '/home/lucas/magna-sistemas-java-code-formatter.xml', + profile = 'MagnaSistemasStyle', + }, }, completion = { favoriteStaticMembers = { diff --git a/init.lua b/init.lua index 069ef49d..f494d72c 100644 --- a/init.lua +++ b/init.lua @@ -156,6 +156,22 @@ vim.opt.cursorline = true -- Minimal number of screen lines to keep above and below the cursor. vim.opt.scrolloff = 15 +vim.api.nvim_create_autocmd('FileType', { + pattern = 'java', + callback = function() + vim.opt_local.colorcolumn = '120' + end, +}) + +-- Set a vertical column marker at column 80 +-- vim.opt.colorcolumn = '120' + +-- If you want multiple column markers, you can do: +-- vim.opt.colorcolumn = "80,100,120" + +-- To customize the color (to make it more transparent/subtle) +vim.cmd [[highlight ColorColumn guibg=rgba(255,0,0,0.2) ctermbg=238]] + -- [[ Basic Keymaps ]] -- See `:help vim.keymap.set()` @@ -665,6 +681,7 @@ require('lazy').setup({ 'java-test', 'prettier', 'eslint_d', + 'angular-language-server', }) require('mason-tool-installer').setup { ensure_installed = ensure_installed } diff --git a/lazy-lock.json b/lazy-lock.json index 4af540e8..380a2f6c 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -30,6 +30,7 @@ "nvim-treesitter": { "branch": "master", "commit": "5774e7d3da4f681296a87fcd85d17779ad362a4f" }, "nvim-web-devicons": { "branch": "master", "commit": "1020869742ecb191f260818234517f4a1515cfe8" }, "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, + "springboot-nvim": { "branch": "main", "commit": "43567bc417c5767bd6d5eb8ff9f8ba8e98d6a9c2" }, "telescope-dap.nvim": { "branch": "master", "commit": "783366bd6c1e7fa0a5c59c07db37f49c805a28df" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "2a5ceff981501cff8f46871d5402cd3378a8ab6a" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, diff --git a/lua/custom/plugins/springboot-nvim.lua b/lua/custom/plugins/springboot-nvim.lua new file mode 100644 index 00000000..37eb2db9 --- /dev/null +++ b/lua/custom/plugins/springboot-nvim.lua @@ -0,0 +1,15 @@ +return { + 'elmcgill/springboot-nvim', + depedencies = { + 'neovim/nvim-lspconfig', + 'mfussenegger/nvim-jdtls', + }, + config = function() + local springboot_nvim = require 'springboot-nvim' + vim.keymap.set('n', 'Jr', springboot_nvim.boot_run, { desc = 'Spring Boot Run Project' }) + vim.keymap.set('n', 'Jc', springboot_nvim.generate_class, { desc = 'Java Create Class' }) + vim.keymap.set('n', 'Ji', springboot_nvim.generate_interface, { desc = 'Java Create Interface' }) + vim.keymap.set('n', 'Je', springboot_nvim.generate_enum, { desc = 'Java Create Enum' }) + springboot_nvim.setup {} + end, +}