From bcf324b4727e8535c4fc891bc4e92d80659c38c4 Mon Sep 17 00:00:00 2001 From: Andre Raposo Date: Fri, 30 May 2025 11:23:58 -0300 Subject: [PATCH] Partial --- init.lua | 44 ++++++++++--------- lua/custom/plugins/love2d.lua | 10 +++++ .../plugins/nvim-treesitter-context.lua | 18 ++++++++ lua/custom/plugins/vimtex.lua | 1 + lua/kickstart/plugins/neo-tree.lua | 1 + 5 files changed, 54 insertions(+), 20 deletions(-) create mode 100644 lua/custom/plugins/love2d.lua create mode 100644 lua/custom/plugins/nvim-treesitter-context.lua create mode 100644 lua/custom/plugins/vimtex.lua diff --git a/init.lua b/init.lua index 1bda3db5..b5b4913e 100644 --- a/init.lua +++ b/init.lua @@ -8,7 +8,7 @@ vim.g.maplocalleader = ' ' vim.g.have_nerd_font = true -- Set global theme -vim.g.theme = 'adwaita' +vim.g.theme = 'oxocarbon' -- [[ Setting options ]] -- See `:help vim.opt` @@ -82,6 +82,7 @@ vim.keymap.set('n', '', 'nohlsearch') -- Diagnostic keymaps vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' }) +vim.keymap.set('n', '', vim.diagnostic.open_float, { desc = 'Open diagnostic on a float window' }) -- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier -- for people to discover. Otherwise, you normally need to press , which @@ -500,14 +501,14 @@ require('lazy').setup({ }) -- Change diagnostic symbols in the sign column (gutter) - -- if vim.g.have_nerd_font then - -- local signs = { ERROR = '', WARN = '', INFO = '', HINT = '' } - -- local diagnostic_signs = {} - -- for type, icon in pairs(signs) do - -- diagnostic_signs[vim.diagnostic.severity[type]] = icon - -- end - -- vim.diagnostic.config { signs = { text = diagnostic_signs } } - -- end + if vim.g.have_nerd_font then + local signs = { ERROR = '', WARN = '', INFO = '', HINT = '' } + local diagnostic_signs = {} + for type, icon in pairs(signs) do + diagnostic_signs[vim.diagnostic.severity[type]] = icon + end + vim.diagnostic.config { signs = { text = diagnostic_signs } } + end -- LSP servers and clients are able to communicate to each other what features they support. -- By default, Neovim doesn't support everything that is in the LSP specification. @@ -542,6 +543,7 @@ require('lazy').setup({ }, }, jedi_language_server = {}, + kotlin_language_server = {}, -- rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- @@ -562,7 +564,7 @@ require('lazy').setup({ callSnippet = 'Replace', }, -- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings - -- diagnostics = { disable = { 'missing-fields' } }, + diagnostics = { disable = { 'missing-fields' } }, }, }, }, @@ -592,6 +594,7 @@ require('lazy').setup({ 'emmet-language-server', -- emmet 'sonarlint-language-server', -- Helpful linting and diagnostics 'markdownlint', + 'ktlint', }) require('mason-tool-installer').setup { ensure_installed = ensure_installed } @@ -638,7 +641,7 @@ require('lazy').setup({ lsp_format_opt = 'fallback' end return { - timeout_ms = 500, + timeout_ms = 750, lsp_format = lsp_format_opt, } end, @@ -791,20 +794,19 @@ require('lazy').setup({ end, }, - { - 'nyoom-engineering/oxocarbon.nvim', - lazy = false, - priority = 1000, - config = function() - vim.cmd.colorscheme(vim.g.theme) - end, - }, - { 'Mofiqul/adwaita.nvim', lazy = false, priority = 1000, }, + + { + 'uloco/bluloco.nvim', + lazy = false, + priority = 1000, + dependencies = { 'rktjmp/lush.nvim' }, + }, + { 'EdenEast/nightfox.nvim', lazy = false, priority = 1000 }, -- lazy -- Highlight todo, notes, etc in comments { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } }, @@ -831,6 +833,8 @@ require('lazy').setup({ -- Simple and easy statusline. -- You could remove this setup call if you don't like it, -- and try some other statusline plugin + require('mini.git').setup() + require('mini.diff').setup() local statusline = require 'mini.statusline' -- set use_icons to true if you have a Nerd Font statusline.setup { use_icons = vim.g.have_nerd_font } diff --git a/lua/custom/plugins/love2d.lua b/lua/custom/plugins/love2d.lua new file mode 100644 index 00000000..10a25588 --- /dev/null +++ b/lua/custom/plugins/love2d.lua @@ -0,0 +1,10 @@ +return { + 'S1M0N38/love2d.nvim', + event = 'VeryLazy', + opts = {}, + keys = { + { 'v', ft = 'lua', desc = 'LÖVE' }, + { 'vv', 'LoveRun', ft = 'lua', desc = 'Run LÖVE' }, + { 'vs', 'LoveStop', ft = 'lua', desc = 'Stop LÖVE' }, + }, +} diff --git a/lua/custom/plugins/nvim-treesitter-context.lua b/lua/custom/plugins/nvim-treesitter-context.lua new file mode 100644 index 00000000..52b40143 --- /dev/null +++ b/lua/custom/plugins/nvim-treesitter-context.lua @@ -0,0 +1,18 @@ +return { + 'nvim-treesitter/nvim-treesitter-context', + opts = { + enable = true, -- Enable this plugin (Can be enabled/disabled later via commands) + multiwindow = false, -- Enable multiwindow support. + max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit. + min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit. + line_numbers = true, + multiline_threshold = 20, -- Maximum number of lines to show for a single context + trim_scope = 'outer', -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer' + mode = 'cursor', -- Line used to calculate context. Choices: 'cursor', 'topline' + -- Separator between context and content. Should be a single character string, like '-'. + -- When separator is set, the context will only show up when there are at least 2 lines above cursorline. + separator = nil, + zindex = 20, -- The Z-index of the context window + on_attach = nil, -- (fun(buf: integer): boolean) return false to disable attaching + }, +} diff --git a/lua/custom/plugins/vimtex.lua b/lua/custom/plugins/vimtex.lua new file mode 100644 index 00000000..a5647075 --- /dev/null +++ b/lua/custom/plugins/vimtex.lua @@ -0,0 +1 @@ +return {} diff --git a/lua/kickstart/plugins/neo-tree.lua b/lua/kickstart/plugins/neo-tree.lua index bdb847d9..1b40b5fe 100644 --- a/lua/kickstart/plugins/neo-tree.lua +++ b/lua/kickstart/plugins/neo-tree.lua @@ -19,6 +19,7 @@ return { opts = { filesystem = { window = { + position = 'right', mappings = { ['\\'] = 'close_window', },