diff --git a/init.lua b/init.lua index e8c8693f..46ffaac8 100644 --- a/init.lua +++ b/init.lua @@ -728,7 +728,7 @@ require('lazy').setup { -- Load the colorscheme here. -- Like many other themes, this one has different styles, and you could load -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. - vim.cmd.colorscheme 'tokyonight-night' + vim.cmd.colorscheme 'tokyonight-day' -- You can configure highlights by doing something like vim.cmd.hi 'Comment gui=none' @@ -808,16 +808,25 @@ require('lazy').setup { -- Here are some example plugins that I've included in the kickstart repository. -- Uncomment any of the lines below to enable them (you will need to restart nvim). -- - -- require 'kickstart.plugins.debug', - -- require 'kickstart.plugins.indent_line', + require 'kickstart.plugins.debug', + require 'kickstart.plugins.indent_line', -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- This is the easiest way to modularize your config. -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. -- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins` - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, } -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et + +-- Enable relative line numbers +vim.wo.relativenumber = true + +-- Cursor line +vim.wo.cursorline = true + +-- Mark default line with to 140 columns +vim.wo.colorcolumn = '140' diff --git a/lua/custom/plugins/copilot.lua b/lua/custom/plugins/copilot.lua new file mode 100644 index 00000000..87beb760 --- /dev/null +++ b/lua/custom/plugins/copilot.lua @@ -0,0 +1,12 @@ +return { + "zbirenbaum/copilot.lua", + cmd = "Copilot", + event = "InsertEnter", + config = function() + require("copilot").setup({ + suggestion = { + auto_trigger = true, + } + }) + end, +} diff --git a/lua/custom/plugins/diffview.lua b/lua/custom/plugins/diffview.lua new file mode 100644 index 00000000..a96a6db1 --- /dev/null +++ b/lua/custom/plugins/diffview.lua @@ -0,0 +1,6 @@ + + +return { + "sindrets/diffview.nvim", +} + diff --git a/lua/custom/plugins/fzf.lua b/lua/custom/plugins/fzf.lua new file mode 100644 index 00000000..069ab229 --- /dev/null +++ b/lua/custom/plugins/fzf.lua @@ -0,0 +1,9 @@ +return { + "ibhagwan/fzf-lua", + -- optional for icon support + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function() + -- calling `setup` is optional for customization + require("fzf-lua").setup({}) + end +} diff --git a/lua/custom/plugins/init copy.lua b/lua/custom/plugins/init copy.lua new file mode 100644 index 00000000..be0eb9d8 --- /dev/null +++ b/lua/custom/plugins/init copy.lua @@ -0,0 +1,5 @@ +-- You can add your own plugins here or in other files in this directory! +-- I promise not to create any merge conflicts in this directory :) +-- +-- See the kickstart.nvim README for more information +return {} diff --git a/lua/custom/plugins/neogit.lua b/lua/custom/plugins/neogit.lua new file mode 100644 index 00000000..8f5075d0 --- /dev/null +++ b/lua/custom/plugins/neogit.lua @@ -0,0 +1,21 @@ + return { + "NeogitOrg/neogit", + dependencies = { + "nvim-lua/plenary.nvim", -- required + "sindrets/diffview.nvim", -- optional - Diff integration + "nvim-telescope/telescope.nvim", -- optional + }, + config = function() + require("neogit").setup({ + kind = "split", -- opens neogit in a split + signs = { + -- { CLOSED, OPENED } + section = { "", "" }, + item = { "", "" }, + hunk = { "", "" }, + }, + integrations = { diffview = true }, -- adds integration with diffview.nvim + }) + end, + config = true +} diff --git a/lua/custom/plugins/neotree.lua b/lua/custom/plugins/neotree.lua new file mode 100644 index 00000000..ee7d4006 --- /dev/null +++ b/lua/custom/plugins/neotree.lua @@ -0,0 +1,30 @@ +-- Unless you are still migrating, remove the deprecated commands from v1.x +vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]]) + +return { + "nvim-neo-tree/neo-tree.nvim", + version = "*", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended + "MunifTanjim/nui.nvim", + }, + config = function() + require('neo-tree').setup { + event_handlers = { + + { + event = "file_opened", + handler = function(file_path) + -- auto close + -- vimc.cmd("Neotree close") + -- OR + require("neo-tree.command").execute({ action = "close" }) + end + }, + + } } + end, + vim.keymap.set('n', '', 'Neotree toggle reveal', { desc = 'Focus Neotree' }), + vim.keymap.set('n', 'gs', 'Neotree float git_status', { desc = 'Git status' }), +} diff --git a/lua/custom/plugins/nvim-toggleterm.lua b/lua/custom/plugins/nvim-toggleterm.lua new file mode 100644 index 00000000..5174ea47 --- /dev/null +++ b/lua/custom/plugins/nvim-toggleterm.lua @@ -0,0 +1,23 @@ +function _G.set_terminal_keymaps() + local opts = { buffer = 0 } + vim.keymap.set('t', '', [[]], opts) + vim.keymap.set('t', 'jk', [[]], opts) + vim.keymap.set('t', '', [[wincmd h]], opts) + vim.keymap.set('t', '', [[wincmd j]], opts) + vim.keymap.set('t', '', [[wincmd k]], opts) + vim.keymap.set('t', '', [[wincmd l]], opts) + vim.keymap.set('t', '', [[]], opts) +end + +return { + 'akinsho/toggleterm.nvim', + version = "*", + config = function() + require('toggleterm').setup {} + end, + vim.keymap.set('n', 'tt', 'ToggleTerm', { desc = 'Toggle terminal' }), + vim.keymap.set('n', 't2', '2ToggleTerm', { desc = 'Toggle terminal 2' }), + vim.keymap.set('n', 't3', '3ToggleTerm', { desc = 'Toggle terminal 3' }), + vim.keymap.set('n', 't4', '4ToggleTerm', { desc = 'Toggle terminal 4' }), + vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()') +} diff --git a/lua/custom/plugins/nx.lua b/lua/custom/plugins/nx.lua new file mode 100644 index 00000000..e1ecace9 --- /dev/null +++ b/lua/custom/plugins/nx.lua @@ -0,0 +1,20 @@ +return { + { + "Equilibris/nx.nvim", + + dependencies = { + "nvim-telescope/telescope.nvim", + }, + + opts = { + nx_cmd_root = "npx nx", + }, + + -- Plugin will load when you use these keys + keys = { + { "nxa", "Telescope nx actions", desc = "nx actions" }, + { "nxg", "Telescope nx generators", desc = "nx generators" }, + { "nxf", "wa | !npx nx format:write | :checktime", desc = "nx format afected" } + }, + }, +} diff --git a/lua/custom/plugins/refactoring.lua b/lua/custom/plugins/refactoring.lua new file mode 100644 index 00000000..f38ab21d --- /dev/null +++ b/lua/custom/plugins/refactoring.lua @@ -0,0 +1,10 @@ +return { + "ThePrimeagen/refactoring.nvim", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-treesitter/nvim-treesitter", + }, + config = function() + require("refactoring").setup({}) + end, +} diff --git a/lua/custom/plugins/session-manager.lua b/lua/custom/plugins/session-manager.lua new file mode 100644 index 00000000..ad2015ba --- /dev/null +++ b/lua/custom/plugins/session-manager.lua @@ -0,0 +1,7 @@ +return { + "Shatur/neovim-session-manager", + dependencies = { "nvim-lua/plenary.nvim" }, + config = function() + require('session_manager').setup({}) + end +} diff --git a/lua/kickstart/plugins/debug.lua b/lua/kickstart/plugins/debug.lua index 7fc783fa..a3850fa6 100644 --- a/lua/kickstart/plugins/debug.lua +++ b/lua/kickstart/plugins/debug.lua @@ -20,6 +20,7 @@ return { -- Add your own debuggers here 'leoluz/nvim-dap-go', + 'mfussenegger/nvim-dap-python' }, config = function() local dap = require 'dap' @@ -43,7 +44,13 @@ return { } -- Basic debugging keymaps, feel free to change to your liking! - vim.keymap.set('n', '', dap.continue, { desc = 'Debug: Start/Continue' }) + vim.keymap.set('n', '', function() + -- (Re-)reads launch.json if present + if vim.fn.filereadable(".vscode/launch.json") then + require("dap.ext.vscode").load_launchjs() + end + require("dap").continue() + end, { desc = 'Debug: Start/Continue' }) vim.keymap.set('n', '', dap.step_into, { desc = 'Debug: Step Into' }) vim.keymap.set('n', '', dap.step_over, { desc = 'Debug: Step Over' }) vim.keymap.set('n', '', dap.step_out, { desc = 'Debug: Step Out' }) @@ -83,5 +90,6 @@ return { -- Install golang specific config require('dap-go').setup() + require("dap-python").setup("python", {}) end, }