Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 41 additions & 30 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ vim.g.mapleader = ' '
vim.g.maplocalleader = ' '

-- Set to true if you have a Nerd Font installed and selected in the terminal
vim.g.have_nerd_font = false
vim.g.have_nerd_font = true

-- [[ Setting options ]]
-- See `:help vim.o`
Expand All @@ -102,7 +102,7 @@ vim.g.have_nerd_font = false
vim.o.number = true
-- You can also add relative line numbers, to help with jumping.
-- Experiment for yourself to see if you like it!
-- vim.o.relativenumber = true
vim.o.relativenumber = true

-- Enable mouse mode, can be useful for resizing splits for example!
vim.o.mouse = 'a'
Expand Down Expand Up @@ -537,7 +537,7 @@ require('lazy').setup({

-- Rename the variable under your cursor.
-- Most Language Servers support renaming across files, etc.
map('grn', vim.lsp.buf.rename, '[R]e[n]ame')
map('rn', vim.lsp.buf.rename, '[R]e[n]ame')

-- Execute a code action, usually your cursor needs to be on top of an error
-- or a suggestion from your LSP for this to activate.
Expand All @@ -553,7 +553,7 @@ require('lazy').setup({
-- Jump to the definition of the word under your cursor.
-- This is where a variable was first declared, or where a function is defined, etc.
-- To jump back, press <C-t>.
map('grd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
map('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')

-- WARN: This is not Goto Definition, this is Goto Declaration.
-- For example, in C this would take you to the header.
Expand Down Expand Up @@ -716,6 +716,15 @@ require('lazy').setup({
local ensure_installed = vim.tbl_keys(servers or {})
vim.list_extend(ensure_installed, {
'stylua', -- Used to format Lua code
'ts_ls',
'biome',
'docker_compose_language_service',
'dockerls',
'graphql',
'jsonls',
'yamlls',
'eslint',
'bashls',
})
require('mason-tool-installer').setup { ensure_installed = ensure_installed }

Expand Down Expand Up @@ -876,27 +885,29 @@ require('lazy').setup({
},
},

{ -- You can easily change to a different colorscheme.
-- Change the name of the colorscheme plugin below, and then
-- change the command in the config to whatever the name of that colorscheme is.
--
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
'folke/tokyonight.nvim',
priority = 1000, -- Make sure to load this before all the other start plugins.
config = function()
---@diagnostic disable-next-line: missing-fields
require('tokyonight').setup {
styles = {
comments = { italic = false }, -- Disable italics in comments
},
}

-- 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'
end,
},
-- { -- You can easily change to a different colorscheme.
-- -- Change the name of the colorscheme plugin below, and then
-- -- change the command in the config to whatever the name of that colorscheme is.
-- --
-- -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
-- 'folke/tokyonight.nvim',
-- priority = 1000, -- Make sure to load this before all the other start plugins.
-- config = function()
-- ---@diagnostic disable-next-line: missing-fields
-- require('tokyonight').setup {
-- styles = {
-- comments = { italic = false }, -- Disable italics in comments
-- },
-- }
--
-- -- 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 'aliqyan-21/darkvoid.nvim'
-- vim.cmd.colorscheme 'nordic'
-- end,
-- },

-- Highlight todo, notes, etc in comments
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
Expand Down Expand Up @@ -975,16 +986,16 @@ require('lazy').setup({
--
-- require 'kickstart.plugins.debug',
-- require 'kickstart.plugins.indent_line',
-- require 'kickstart.plugins.lint',
-- require 'kickstart.plugins.autopairs',
-- require 'kickstart.plugins.neo-tree',
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
require 'kickstart.plugins.lint',
require 'kickstart.plugins.autopairs',
require 'kickstart.plugins.neo-tree',
require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps

-- 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.
-- { import = 'custom.plugins' },
{ import = 'custom.plugins' },
--
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
-- Or use telescope!
Expand Down
14 changes: 14 additions & 0 deletions lua/custom/plugins/comment.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
return {
{
'numToStr/Comment.nvim',
config = function(_, opts)
require('Comment').setup(opts)

vim.keymap.set('n', '<leader>/', function()
require('Comment.api').toggle.linewise.current()
end, { desc = 'comment toggle' })

vim.keymap.set('v', '<leader>/', "<ESC><cmd>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<CR>", { desc = 'comment toggle' })
end,
},
}
18 changes: 18 additions & 0 deletions lua/custom/plugins/copilot-chat.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
return {
{
'CopilotC-Nvim/CopilotChat.nvim',
dependencies = {
{ 'nvim-lua/plenary.nvim', branch = 'master' },
},
build = 'make tiktoken',
init = function()
local map = vim.api.nvim_set_keymap
local opts = { noremap = true, silent = true }

map('n', '<leader>ch', '<Cmd>CopilotChatToggle<CR>', opts)
end,
opts = {
-- See Configuration section for options
},
},
}
26 changes: 26 additions & 0 deletions lua/custom/plugins/copilot.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
return {
{
'zbirenbaum/copilot.lua',
cmd = 'Copilot',
event = 'InsertEnter',
config = function()
require('copilot').setup {
suggestion = {
enabled = false,
auto_trigger = true,
keymap = {
accept = '<M-l>',
},
},
panel = {
enabled = true,
auto_refresh = true,
},
filetypes = {
['*'] = true,
typescript = true,
},
}
end,
},
}
10 changes: 9 additions & 1 deletion lua/custom/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,12 @@
-- I promise not to create any merge conflicts in this directory :)
--
-- See the kickstart.nvim README for more information
return {}
return {
require 'custom.plugins.comment',
require 'custom.plugins.tabs',
require 'custom.plugins.copilot',
require 'custom.plugins.copilot-chat',
require 'custom.plugins.neo-tree-config',
require 'custom.plugins.sleuth',
require 'custom.plugins.theme',
}
36 changes: 36 additions & 0 deletions lua/custom/plugins/neo-tree-config.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
return {
{
'nvim-neo-tree/neo-tree.nvim',
branch = 'v3.x',
dependencies = {
'nvim-lua/plenary.nvim',
'nvim-tree/nvim-web-devicons',
'MunifTanjim/nui.nvim',
},
keys = {
{ '<leader>e', desc = 'Open NeoTree' },
{ '<leader>n', desc = 'Focus NeoTree' },
},
config = function()
local toggle_tree = function()
vim.cmd 'Neotree toggle'
vim.opt.relativenumber = true -- Use relative line numbers
end

-- Set up your custom keymaps
vim.keymap.set('n', '<leader>e', toggle_tree, { desc = 'Open NeoTree' })
vim.keymap.set('n', '<leader>n', function()
vim.cmd 'Neotree focus'
end, { desc = 'Focus NeoTree' })

-- Setup neo-tree
require('neo-tree').setup {
filesystem = {
follow_current_file = {
enabled = true,
},
},
}
end,
},
}
7 changes: 7 additions & 0 deletions lua/custom/plugins/sleuth.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
return {
{
'tpope/vim-sleuth',
config = function() end,
opts = {},
},
}
26 changes: 26 additions & 0 deletions lua/custom/plugins/tabs.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
return {
{
'romgrk/barbar.nvim',
dependencies = {
'lewis6991/gitsigns.nvim', -- OPTIONAL: for git status
'nvim-tree/nvim-web-devicons', -- OPTIONAL: for file icons
},
init = function()
local map = vim.api.nvim_set_keymap
local opts = { noremap = true, silent = true }
vim.g.barbar_auto_setup = false
map('n', '<Tab>', '<Cmd>BufferNext<CR>', opts)
map('n', '<S-Tab>', '<Cmd>BufferPrevious<CR>', opts)
map('n', '<leader>xx', '<Cmd>BufferClose<CR>', opts)
map('n', '<leader>xl', '<Cmd>BufferCloseBuffersRight<CR>', opts)
map('n', '<leader>xh', '<Cmd>BufferCloseBuffersLeft<CR>', opts)
end,
opts = {
-- lazy.nvim will automatically call setup for you. put your options here, anything missing will use the default:
animation = true,
-- insert_at_start = true,
-- …etc.
},
version = '^1.0.0', -- optional: only update when a new 1.x version is released
},
}
86 changes: 86 additions & 0 deletions lua/custom/plugins/theme.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
-- return {
-- 'AlexvZyl/nordic.nvim',
-- lazy = false,
-- priority = 1000,
-- config = function()
-- require('nordic').load()
-- vim.cmd.colorscheme 'nordic'
-- end,
-- }

return {
'rebelot/kanagawa.nvim',
lazy = false,
priority = 1000,
config = function()
require('kanagawa').setup {
commentStyle = {
italic = true,
},
-- optional: your custom config here
}
vim.cmd 'colorscheme kanagawa-dragon'
end,
}

-- return {
-- 'aliqyan-21/darkvoid.nvim',
-- priority = 1000,
-- lazy = false,
-- init = function()
-- require('darkvoid').setup {
-- glow = true,
-- transparent = true,
-- colors = {
-- fg = '#c0c0c0',
-- bg = '#1c1c1c',
-- cursor = '#fdd41b',
-- line_nr = '#404040',
-- visual = '#303030',
-- comment = '#737373',
-- string = '#66b2b2',
-- func = '#1bfd9c',
-- kw = '#fe5e58',
-- identifier = '#b1b1b1',
-- type = '#a1a1a1',
-- search_highlight = '#fdd41b',
-- operator = '#1bfd9c',
-- bracket = '#e6e6e6',
-- preprocessor = '#4b8902',
-- bool = '#d1d1d1',
-- constant = '#b2d8d8',
--
-- -- gitsigns colors
-- added = '#baffc9',
-- changed = '#ffffba',
-- removed = '#ffb3ba',
--
-- -- Pmenu colors
-- pmenu_bg = '#1c1c1c',
-- pmenu_sel_bg = '#1bfd9c',
-- pmenu_fg = '#c0c0c0',
--
-- -- EndOfBuffer color
-- eob = '#3c3c3c',
--
-- -- Telescope specific colors
-- border = '#fe5e58',
-- title = '#ffffff',
--
-- -- bufferline specific colors
-- bufferline_selection = '#1bfd9c',
--
-- -- LSP diagnostics colors
-- error = '#dea6a0',
-- warning = '#d6efd8',
-- hint = '#bedc74',
-- info = '#7fa1c3',
-- },
-- }
-- -- You can configure highlights by doing something like:
-- vim.cmd.hi 'Comment gui=none'
-- vim.cmd.hi 'Normal guibg=none'
-- vim.cmd.hi 'Normal guibg=none'
-- vim.cmd.colorscheme 'darkvoid'
-- end,
-- }