31 Commits

Author SHA1 Message Date
bd4b8d0888 new default theme is light mode 2026-03-04 13:12:23 +01:00
c9a2ff9699 added c/c++ debugging plugin that uses codelldb 2026-03-04 13:12:06 +01:00
bdfe1b0c64 only navigate with hjkl 2026-03-04 13:11:19 +01:00
2c43d15c7d unity plugin 2026-03-04 13:10:35 +01:00
f251b39d5a more columns for c/cpp code 2026-02-05 15:28:12 +01:00
4fcf6d7010 Update lua/kickstart/plugins/treesitter.lua 2026-01-29 15:57:15 +01:00
c1e234f1ac new harpoon keybinds 2026-01-08 20:59:02 +01:00
8a7cd58c74 updated clang format options 2025-12-31 16:58:27 +01:00
87cdec67a4 added cpp 2025-12-29 15:07:57 +01:00
43cc16d73a updated conform formatter to work with c 2025-12-29 15:07:35 +01:00
593752ff28 added plugins 2025-11-29 20:03:13 +01:00
bb0d2cf102 turned on neotree and changed theme 2025-11-21 19:58:14 +01:00
6846260101 updated config to disable lsp warning vim.lsp.config 2025-10-24 18:58:32 +02:00
c6f50bd626 added mason ensure installed packages 2025-09-24 09:38:50 +02:00
e84927ba57 working harpoon2 with telescope, keymap todo 2025-09-23 14:59:02 +02:00
6d402a0901 cpp tls update 2025-09-13 12:26:58 +02:00
d9807a35b5 added java tls 2025-09-12 15:02:47 +02:00
killeik
f2309053c7 Use the dot syntax for module paths 2025-06-14 23:07:22 +02:00
Damjan 9000
d2844a4163 Merge 'upstream': Update remaining Mason's old address 2025-06-08 20:45:42 +02:00
Carlos Calla Alarcón
3338d39206 Update remaining Mason's old address (#1530) 2025-05-22 17:10:04 -04:00
jaho5
61e8b304e5 Update windows installation command 2025-05-18 10:06:22 +02:00
Damjan 9000
726fabc5d5 Merge 'upstream': various changes 2025-05-10
- fix: rename vim.highlight.on_yank to vim.hl.on_yank
- README: mention fd-find in requirements
- don't lazy-load neo-tree so netrw hijacking on startup works
- Replace vim.opt with vim.o
- feat: switch vim-sleuth for guess-indent.nvim
- Change to Mason's new address
2025-05-12 12:14:27 +02:00
Omri Sarig
6ba2408cdf fix: rename vim.highlight.on_yank to vim.hl.on_yank (#1482)
The functions of vim.highlight were renamed to vim.hl on commit
18b43c331d8a0ed87d7cbefe2a18543b8e4ad360 of neovim, which was applied
with the release of nvim version 0.11.

Now, the use of vim.highlight is deprecated, and instead, one should
use vim.hl functions.
In practice, vim.highlight is still working, however, asking for help
for vim.highlight.on_yank fails (E149), while asking for help for
vim.hl.on_yank works as expected. So, by updating the used function, a
new user will have easier time looking getting the relevant help.

Co-authored-by: Omri Sarig <omri.sarig@prevas.dk>
2025-05-10 20:29:04 -04:00
Damjan 9000
f5a9f9cdc6 README: mention fd-find in requirements (#1477)
Fixes #1476
2025-05-10 20:23:54 -04:00
pynappo
fb73617653 don't lazy-load neo-tree so netrw hijacking on startup works (#1489) 2025-05-10 20:18:04 -04:00
Ori Perry
c92ea7ca97 Replace vim.opt with vim.o (#1495)
* Replace vim.opt with vim.o

Because it offers a nicer interface and info on hover.
For now leave vim.opt when using the table interface (until vim.o
with tables is implemented)

* Add type hint for vim.opt.rtp

* Add a comment about using vim.opt instead of vim.o
2025-05-10 20:16:03 -04:00
guru245
2b2f0f8364 feat: switch vim-sleuth for guess-indent.nvim (#1512) 2025-05-10 20:11:50 -04:00
guru245
76cb865e4f Change to Mason's new address (#1516) 2025-05-09 19:41:44 -04:00
Damjan 9000
f8727376ad remove cmp.lua which was replaced with blink-cmp.lua 2025-04-15 21:01:39 +02:00
Damjan 9000
b226b49545 Merge 'upstream': feat: switch nvim-cmp for blink.cmp 2025-04-15 18:14:59 +02:00
Liam Dyer
d350db2449 feat: switch nvim-cmp for blink.cmp (#1426) 2025-04-09 17:25:57 -04:00
21 changed files with 566 additions and 223 deletions

View File

@@ -25,7 +25,8 @@ If you are experiencing issues, please make sure you have the latest versions.
External Requirements:
- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`)
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation)
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation),
[fd-find](https://github.com/sharkdp/fd#installation)
- Clipboard tool (xclip/xsel/win32yank or other depending on the platform)
- A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons
- if you have it set `vim.g.have_nerd_font` in `init.lua` to true
@@ -85,13 +86,13 @@ git clone https://github.com/dam9000/kickstart-modular.nvim.git "${XDG_CONFIG_HO
If you're using `cmd.exe`:
```
git clone https://github.com/dam9000/kickstart.nvim.git "%localappdata%\nvim"
git clone https://github.com/dam9000/kickstart-modular.nvim.git "%localappdata%\nvim"
```
If you're using `powershell.exe`
```
git clone https://github.com/dam9000/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim"
git clone https://github.com/dam9000/kickstart-modular.nvim.git "${env:LOCALAPPDATA}\nvim"
```
</details>

View File

@@ -91,7 +91,12 @@ 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
vim.o.tabstop = 4 -- A TAB character looks like 4 spaces
vim.o.expandtab = true -- Pressing the TAB key will insert spaces instead of a TAB character
vim.o.softtabstop = 4 -- Number of spaces inserted instead of a TAB character
vim.o.shiftwidth = 4 -- Number of spaces inserted when indenting
-- [[ Setting options ]]
require 'options'

View File

@@ -0,0 +1,64 @@
return {
'ThePrimeagen/harpoon',
branch = 'harpoon2',
dependecies = { 'nvim-lua/plenary.nvim' },
config = function()
local harpoon = require 'harpoon'
harpoon:setup()
vim.keymap.set('n', '<leader>a', function()
harpoon:list():add()
end)
vim.keymap.set('n', '<leader>e', function()
harpoon.ui:toggle_quick_menu(harpoon:list())
end)
vim.keymap.set('n', '<leader>í', function()
harpoon:list():select(1)
end)
vim.keymap.set('n', '<leader>y', function()
harpoon:list():select(2)
end)
vim.keymap.set('n', '<leader>x', function()
harpoon:list():select(3)
end)
vim.keymap.set('n', '<leader>c', function()
harpoon:list():select(4)
end)
-- Toggle previous & next buffers stored within Harpoon list
vim.keymap.set('n', '<C-S-P>', function()
harpoon:list():prev()
end)
vim.keymap.set('n', '<C-S-N>', function()
harpoon:list():next()
end)
-- basic telescope configuration
local conf = require('telescope.config').values
local function toggle_telescope(harpoon_files)
local file_paths = {}
for _, item in ipairs(harpoon_files.items) do
table.insert(file_paths, item.value)
end
require('telescope.pickers')
.new({}, {
prompt_title = 'Harpoon',
finder = require('telescope.finders').new_table {
results = file_paths,
},
previewer = conf.file_previewer {},
sorter = conf.generic_sorter {},
})
:find()
end
vim.keymap.set('n', '<C-e>', function()
toggle_telescope(harpoon:list())
end, { desc = 'Open harpoon window' })
end,
--keymaps
}

View File

@@ -1,5 +0,0 @@
-- 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 {}

View File

@@ -0,0 +1,126 @@
return {
'walcht/neovim-unity',
ft = { 'cs' },
dependencies = { 'neovim/nvim-lspconfig' }, -- Ensure lspconfig is loaded first
config = function()
local function on_init_sln(client, target)
vim.notify('Initializing: ' .. target, vim.log.levels.INFO)
---@diagnostic disable-next-line: param-type-mismatch
client:notify('solution/open', {
solution = vim.uri_from_fname(target),
})
end
local function on_init_project(client, project_files)
vim.notify('Initializing: projects', vim.log.levels.INFO)
---@diagnostic disable-next-line: param-type-mismatch
client:notify('project/open', {
projects = vim.tbl_map(function(file)
return vim.uri_from_fname(file)
end, project_files),
})
end
local function project_root_dir_discovery(bufnr, cb)
local bufname = vim.api.nvim_buf_get_name(bufnr)
if not bufname:match('^' .. vim.fs.joinpath '/tmp/MetadataAsSource/') then
local root_dir = vim.fs.root(bufnr, function(fname, _)
return fname:match '%.sln$' ~= nil
end)
if not root_dir then
root_dir = vim.fs.root(bufnr, function(fname, _)
return fname:match '%.csproj$' ~= nil
end)
end
if root_dir then
cb(root_dir)
else
vim.notify('[C# LSP] failed to find root directory', vim.log.levels.ERROR)
end
end
end
local roslyn_handlers = {
['workspace/projectInitializationComplete'] = function(_, _, ctx)
vim.notify('Roslyn project initialization complete', vim.log.levels.INFO)
local buffers = vim.lsp.get_buffers_by_client_id(ctx.client_id)
local client = assert(vim.lsp.get_client_by_id(ctx.client_id))
for _, buf in ipairs(buffers) do
client:request(vim.lsp.protocol.Methods.textDocument_diagnostic, {
textDocument = vim.lsp.util.make_text_document_params(buf),
}, nil, buf)
end
end,
['workspace/_roslyn_projectNeedsRestore'] = function(_, result, ctx)
local client = assert(vim.lsp.get_client_by_id(ctx.client_id))
client:request('workspace/_roslyn_restore', result, function(err, response)
if err then
vim.notify(err.message, vim.log.levels.ERROR)
end
if response then
vim.notify('Restoring project...', vim.log.levels.INFO)
end
end)
return vim.NIL
end,
['razor/provideDynamicFileInfo'] = function(_, _, _)
-- Razor not supported
end,
}
local roslyn_ls_config = {
name = 'roslyn_ls',
offset_encoding = 'utf-8',
cmd = {
'dotnet',
'$HOME/.config/roslylsp/Microsoft.CodeAnalysis.LanguageServer.dll',
'--logLevel=Error',
'--extensionLogDirectory=' .. vim.fs.dirname(vim.lsp.get_log_path()),
'--stdio',
},
filetypes = { 'cs' },
handlers = roslyn_handlers,
root_dir = project_root_dir_discovery,
on_init = function(client)
local root_dir = client.config.root_dir
for entry, type in vim.fs.dir(root_dir) do
if type == 'file' and vim.endswith(entry, '.sln') then
on_init_sln(client, vim.fs.joinpath(root_dir, entry))
return
end
end
for entry, type in vim.fs.dir(root_dir) do
if type == 'file' and vim.endswith(entry, '.csproj') then
on_init_project(client, { vim.fs.joinpath(root_dir, entry) })
end
end
end,
capabilities = vim.lsp.protocol.make_client_capabilities(),
settings = {
['csharp|background_analysis'] = {
dotnet_analyzer_diagnostics_scope = 'fullSolution',
dotnet_compiler_diagnostics_scope = 'fullSolution',
},
['csharp|inlay_hints'] = {
csharp_enable_inlay_hints_for_types = true,
dotnet_enable_inlay_hints_for_parameters = true,
},
['csharp|completion'] = {
dotnet_show_name_completion_suggestions = true,
},
},
}
-- NOTE: 'vim.lsp.config' does not exist in standard Neovim.
-- We use an autocommand to start the LSP when a C# file opens.
vim.api.nvim_create_autocmd('FileType', {
pattern = 'cs',
callback = function()
vim.lsp.start(roslyn_ls_config)
end,
})
end,
}

View File

@@ -17,10 +17,10 @@ vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagn
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
-- TIP: Disable arrow keys in normal mode
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
-- vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
-- vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
-- vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
-- Keybinds to make split navigation easier.
-- Use CTRL+<hjkl> to switch between windows
@@ -40,14 +40,16 @@ vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper win
-- [[ Basic Autocommands ]]
-- See `:help lua-guide-autocommands`
vim.keymap.set('n', 'gl', vim.diagnostic.open_float, { desc = 'Show Error/Diagnostic' })
-- Highlight when yanking (copying) text
-- Try it with `yap` in normal mode
-- See `:help vim.highlight.on_yank()`
-- See `:help vim.hl.on_yank()`
vim.api.nvim_create_autocmd('TextYankPost', {
desc = 'Highlight when yanking (copying) text',
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
callback = function()
vim.highlight.on_yank()
vim.hl.on_yank()
end,
})

View File

@@ -4,13 +4,5 @@
return {
'windwp/nvim-autopairs',
event = 'InsertEnter',
-- Optional dependency
dependencies = { 'hrsh7th/nvim-cmp' },
config = function()
require('nvim-autopairs').setup {}
-- If you want to automatically add `(` after selecting a function or method
local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
local cmp = require 'cmp'
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
end,
opts = {},
}

View File

@@ -0,0 +1,101 @@
return {
{ -- Autocompletion
'saghen/blink.cmp',
event = 'VimEnter',
version = '1.*',
dependencies = {
-- Snippet Engine
{
'L3MON4D3/LuaSnip',
version = '2.*',
build = (function()
-- Build Step is needed for regex support in snippets.
-- This step is not supported in many windows environments.
-- Remove the below condition to re-enable on windows.
if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then
return
end
return 'make install_jsregexp'
end)(),
dependencies = {
-- `friendly-snippets` contains a variety of premade snippets.
-- See the README about individual language/framework/plugin snippets:
-- https://github.com/rafamadriz/friendly-snippets
-- {
-- 'rafamadriz/friendly-snippets',
-- config = function()
-- require('luasnip.loaders.from_vscode').lazy_load()
-- end,
-- },
},
opts = {},
},
'folke/lazydev.nvim',
},
--- @module 'blink.cmp'
--- @type blink.cmp.Config
opts = {
keymap = {
-- 'default' (recommended) for mappings similar to built-in completions
-- <c-y> to accept ([y]es) the completion.
-- This will auto-import if your LSP supports it.
-- This will expand snippets if the LSP sent a snippet.
-- 'super-tab' for tab to accept
-- 'enter' for enter to accept
-- 'none' for no mappings
--
-- For an understanding of why the 'default' preset is recommended,
-- you will need to read `:help ins-completion`
--
-- No, but seriously. Please read `:help ins-completion`, it is really good!
--
-- All presets have the following mappings:
-- <tab>/<s-tab>: move to right/left of your snippet expansion
-- <c-space>: Open menu or open docs if already open
-- <c-n>/<c-p> or <up>/<down>: Select next/previous item
-- <c-e>: Hide menu
-- <c-k>: Toggle signature help
--
-- See :h blink-cmp-config-keymap for defining your own keymap
preset = 'default',
-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
},
appearance = {
-- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
-- Adjusts spacing to ensure icons are aligned
nerd_font_variant = 'mono',
},
completion = {
-- By default, you may press `<c-space>` to show the documentation.
-- Optionally, set `auto_show = true` to show the documentation after a delay.
documentation = { auto_show = false, auto_show_delay_ms = 500 },
},
sources = {
default = { 'lsp', 'path', 'snippets', 'lazydev' },
providers = {
lazydev = { module = 'lazydev.integrations.blink', score_offset = 100 },
},
},
snippets = { preset = 'luasnip' },
-- Blink.cmp includes an optional, recommended rust fuzzy matcher,
-- which automatically downloads a prebuilt binary when enabled.
--
-- By default, we use the Lua implementation instead, but you may enable
-- the rust implementation via `'prefer_rust_with_warning'`
--
-- See :h blink-cmp-config-fuzzy for more information
fuzzy = { implementation = 'lua' },
-- Shows a signature help window while you type arguments for a function
signature = { enabled = true },
},
},
}
-- vim: ts=2 sts=2 sw=2 et

View File

@@ -1,120 +0,0 @@
return {
{ -- Autocompletion
'hrsh7th/nvim-cmp',
event = 'InsertEnter',
dependencies = {
-- Snippet Engine & its associated nvim-cmp source
{
'L3MON4D3/LuaSnip',
build = (function()
-- Build Step is needed for regex support in snippets.
-- This step is not supported in many windows environments.
-- Remove the below condition to re-enable on windows.
if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then
return
end
return 'make install_jsregexp'
end)(),
dependencies = {
-- `friendly-snippets` contains a variety of premade snippets.
-- See the README about individual language/framework/plugin snippets:
-- https://github.com/rafamadriz/friendly-snippets
-- {
-- 'rafamadriz/friendly-snippets',
-- config = function()
-- require('luasnip.loaders.from_vscode').lazy_load()
-- end,
-- },
},
},
'saadparwaiz1/cmp_luasnip',
-- Adds other completion capabilities.
-- nvim-cmp does not ship with all sources by default. They are split
-- into multiple repos for maintenance purposes.
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-path',
'hrsh7th/cmp-nvim-lsp-signature-help',
},
config = function()
-- See `:help cmp`
local cmp = require 'cmp'
local luasnip = require 'luasnip'
luasnip.config.setup {}
cmp.setup {
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
completion = { completeopt = 'menu,menuone,noinsert' },
-- For an understanding of why these mappings were
-- chosen, you will need to read `:help ins-completion`
--
-- No, but seriously. Please read `:help ins-completion`, it is really good!
mapping = cmp.mapping.preset.insert {
-- Select the [n]ext item
['<C-n>'] = cmp.mapping.select_next_item(),
-- Select the [p]revious item
['<C-p>'] = cmp.mapping.select_prev_item(),
-- Scroll the documentation window [b]ack / [f]orward
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
-- Accept ([y]es) the completion.
-- This will auto-import if your LSP supports it.
-- This will expand snippets if the LSP sent a snippet.
['<C-y>'] = cmp.mapping.confirm { select = true },
-- If you prefer more traditional completion keymaps,
-- you can uncomment the following lines
--['<CR>'] = cmp.mapping.confirm { select = true },
--['<Tab>'] = cmp.mapping.select_next_item(),
--['<S-Tab>'] = cmp.mapping.select_prev_item(),
-- Manually trigger a completion from nvim-cmp.
-- Generally you don't need this, because nvim-cmp will display
-- completions whenever it has completion options available.
['<C-Space>'] = cmp.mapping.complete {},
-- Think of <c-l> as moving to the right of your snippet expansion.
-- So if you have a snippet that's like:
-- function $name($args)
-- $body
-- end
--
-- <c-l> will move you to the right of each of the expansion locations.
-- <c-h> is similar, except moving you backwards.
['<C-l>'] = cmp.mapping(function()
if luasnip.expand_or_locally_jumpable() then
luasnip.expand_or_jump()
end
end, { 'i', 's' }),
['<C-h>'] = cmp.mapping(function()
if luasnip.locally_jumpable(-1) then
luasnip.jump(-1)
end
end, { 'i', 's' }),
-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
},
sources = {
{
name = 'lazydev',
-- set group index to 0 to skip loading LuaLS completions as lazydev recommends it
group_index = 0,
},
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'path' },
{ name = 'nvim_lsp_signature_help' },
},
}
end,
},
}
-- vim: ts=2 sts=2 sw=2 et

View File

@@ -19,7 +19,7 @@ return {
-- Disable "format_on_save lsp_fallback" for languages that don't
-- have a well standardized coding style. You can add additional
-- languages here or re-enable it for the disabled ones.
local disable_filetypes = { c = true, cpp = true }
local disable_filetypes = { c = false, cpp = false }
if disable_filetypes[vim.bo[bufnr].filetype] then
return nil
else
@@ -31,12 +31,20 @@ return {
end,
formatters_by_ft = {
lua = { 'stylua' },
c = { 'clang-format' },
cpp = { 'clang-format' },
-- Conform can also run multiple formatters sequentially
-- python = { "isort", "black" },
--
-- You can use 'stop_after_first' to run the first available formatter from the list
-- javascript = { "prettierd", "prettier", stop_after_first = true },
},
formatters = {
['clang-format'] = {
-- This argument forces 4-space indentation directly in the command
prepend_args = { '--style={IndentWidth: 4, TabWidth: 4, UseTab: Never, AccessModifierOffset: -4, ColumnLimit: 220}' },
},
},
},
},
}

View File

@@ -18,7 +18,7 @@ return {
'nvim-neotest/nvim-nio',
-- Installs the debug adapters for you
'williamboman/mason.nvim',
'mason-org/mason.nvim',
'jay-babu/mason-nvim-dap.nvim',
-- Add your own debuggers here
@@ -81,6 +81,81 @@ return {
local dap = require 'dap'
local dapui = require 'dapui'
dap.adapters['rust-gdb'] = {
type = 'executable',
command = 'rust-gdb',
args = { '--interpreter=dap', '--eval-command', 'set print pretty on' },
}
dap.configurations.rust = {
{
name = 'Launch',
type = 'rust-gdb',
request = 'launch',
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end,
args = {}, -- provide arguments if needed
cwd = '${workspaceFolder}',
stopAtBeginningOfMainSubprogram = false,
},
{
name = 'Select and attach to process',
type = 'rust-gdb',
request = 'attach',
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end,
pid = function()
local name = vim.fn.input 'Executable name (filter): '
return require('dap.utils').pick_process { filter = name }
end,
cwd = '${workspaceFolder}',
},
{
name = 'Attach to gdbserver :1234',
type = 'rust-gdb',
request = 'attach',
target = 'localhost:1234',
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end,
cwd = '${workspaceFolder}',
},
}
dap.configurations.cpp = {
{
name = 'Auto-Debug Project (codelldb)',
type = 'codelldb',
request = 'launch',
program = function()
-- 1. Get the current working directory
local cwd = vim.fn.getcwd()
-- 2. Extract the name of the root folder (e.g., "SakuraVNE")
local project_name = vim.fn.fnamemodify(cwd, ':t')
-- 3. Construct your specific build path
local auto_path = cwd .. '/build/bin/Debug-linux-x86_64/' .. project_name .. '/' .. project_name
-- 4. Check if it actually exists. If it does, run it instantly!
if vim.fn.filereadable(auto_path) == 1 then
return auto_path
end
-- 5. Fallback: If it couldn't find it, pop open an input box so you can type it manually
return vim.fn.input('Path to executable: ', cwd .. '/build/bin/Debug-linux-x86_64/', 'file')
end,
cwd = '${workspaceFolder}',
stopOnEntry = false,
args = {}, -- Add command line arguments here if your engine ever needs them
},
}
-- Tell C to use the exact same configuration as C++
dap.configurations.c = dap.configurations.cpp
require('mason-nvim-dap').setup {
-- Makes a best effort to setup the various debuggers with
-- reasonable debug configurations
@@ -95,6 +170,7 @@ return {
ensure_installed = {
-- Update this to ensure that you have the debuggers for the langs you want
'delve',
'codelldb',
},
}
@@ -121,16 +197,16 @@ return {
}
-- Change breakpoint icons
-- vim.api.nvim_set_hl(0, 'DapBreak', { fg = '#e51400' })
-- vim.api.nvim_set_hl(0, 'DapStop', { fg = '#ffcc00' })
-- local breakpoint_icons = vim.g.have_nerd_font
-- and { Breakpoint = '', BreakpointCondition = '', BreakpointRejected = '', LogPoint = '', Stopped = '' }
-- or { Breakpoint = '●', BreakpointCondition = '⊜', BreakpointRejected = '⊘', LogPoint = '◆', Stopped = '⭔' }
-- for type, icon in pairs(breakpoint_icons) do
-- local tp = 'Dap' .. type
-- local hl = (type == 'Stopped') and 'DapStop' or 'DapBreak'
-- vim.fn.sign_define(tp, { text = icon, texthl = hl, numhl = hl })
-- end
vim.api.nvim_set_hl(0, 'DapBreak', { fg = '#e51400' })
vim.api.nvim_set_hl(0, 'DapStop', { fg = '#ffcc00' })
local breakpoint_icons = vim.g.have_nerd_font
and { Breakpoint = '', BreakpointCondition = '', BreakpointRejected = '', LogPoint = '', Stopped = '' }
or { Breakpoint = '', BreakpointCondition = '', BreakpointRejected = '', LogPoint = '', Stopped = '' }
for type, icon in pairs(breakpoint_icons) do
local tp = 'Dap' .. type
local hl = (type == 'Stopped') and 'DapStop' or 'DapBreak'
vim.fn.sign_define(tp, { text = icon, texthl = hl, numhl = hl })
end
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
dap.listeners.before.event_terminated['dapui_config'] = dapui.close

View File

@@ -1,9 +0,0 @@
return {
{ -- Add indentation guides even on blank lines
'lukas-reineke/indent-blankline.nvim',
-- Enable `lukas-reineke/indent-blankline.nvim`
-- See `:help ibl`
main = 'ibl',
opts = {},
},
}

View File

@@ -50,7 +50,7 @@ return {
-- Only run the linter in buffers that you can modify in order to
-- avoid superfluous noise, notably within the handy LSP pop-ups that
-- describe the hovered symbol using Markdown.
if vim.opt_local.modifiable:get() then
if vim.bo.modifiable then
lint.try_lint()
end
end,

View File

@@ -19,15 +19,16 @@ return {
-- Automatically install LSPs and related tools to stdpath for Neovim
-- Mason must be loaded before its dependents so we need to set it up here.
-- NOTE: `opts = {}` is the same as calling `require('mason').setup({})`
{ 'williamboman/mason.nvim', opts = {} },
'williamboman/mason-lspconfig.nvim',
{ 'mason-org/mason.nvim', opts = {} },
'mason-org/mason-lspconfig.nvim',
'WhoIsSethDaniel/mason-tool-installer.nvim',
'nvim-java/nvim-java',
-- Useful status updates for LSP.
{ 'j-hui/fidget.nvim', opts = {} },
-- Allows extra capabilities provided by nvim-cmp
'hrsh7th/cmp-nvim-lsp',
-- Allows extra capabilities provided by blink.cmp
'saghen/blink.cmp',
},
config = function()
-- Brief aside: **What is LSP?**
@@ -194,10 +195,9 @@ return {
-- 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.
-- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.
-- So, we create new capabilities with nvim cmp, and then broadcast that to the servers.
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities())
-- When you add blink.cmp, luasnip, etc. Neovim now has *more* capabilities.
-- So, we create new capabilities with blink.cmp, and then broadcast that to the servers.
local capabilities = require('blink.cmp').get_lsp_capabilities()
-- Enable the following language servers
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
@@ -209,19 +209,19 @@ return {
-- - settings (table): Override the default settings passed when initializing the server.
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
local servers = {
-- clangd = {},
-- gopls = {},
-- pyright = {},
-- rust_analyzer = {},
clangd = {},
gopls = {},
pyright = {},
rust_analyzer = {},
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
--
-- Some languages (like typescript) have entire language plugins that can be useful:
-- https://github.com/pmizio/typescript-tools.nvim
--
-- But for many setups, the LSP (`ts_ls`) will work just fine
-- ts_ls = {},
ts_ls = {},
--
--
lua_ls = {
-- cmd = { ... },
-- filetypes = { ... },
@@ -238,6 +238,53 @@ return {
},
}
--require('java').setup {
-- Your custom jdtls settings goes here
--}
vim.lsp.config['java'] = {}
--require('lspconfig').jdtls.setup {
-- Your custom nvim-java configuration goes here
--}
vim.lsp.config['jdtls'] = {}
-- The following loop will configure each server with the capabilities we defined above.
-- This will ensure that all servers have the same base configuration, but also
-- allow for server-specific overrides.
for server_name, server_config in pairs(servers) do
server_config.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server_config.capabilities or {})
--require('lspconfig')[server_name].setup(server_config)
vim.lsp.config(server_name, server_config)
end
vim.lsp.config['emmet-language-server'] = {
opts = {
filetypes = { 'css', 'eruby', 'html', 'javascript', 'javascriptreact', 'less', 'sass', 'scss', 'pug', 'typescriptreact' },
-- Read more about this options in the [vscode docs](https://code.visualstudio.com/docs/editor/emmet#_emmet-configuration).
-- **Note:** only the options listed in the table are supported.
init_options = {
---@type table<string, string>
includeLanguages = {},
--- @type string[]
excludeLanguages = {},
--- @type string[]
extensionsPath = {},
--- @type table<string, any> [Emmet Docs](https://docs.emmet.io/customization/preferences/)
preferences = {},
--- @type boolean Defaults to `true`
showAbbreviationSuggestions = true,
--- @type "always" | "never" Defaults to `"always"`
showExpandedAbbreviation = 'always',
--- @type boolean Defaults to `false`
showSuggestionsAsSnippets = false,
--- @type table<string, any> [Emmet Docs](https://docs.emmet.io/customization/syntax-profiles/)
syntaxProfiles = {},
--- @type table<string, string> [Emmet Docs](https://docs.emmet.io/customization/snippets/#variables)
variables = {},
},
},
}
-- Ensure the servers and tools above are installed
--
-- To check the current status of installed tools and/or manually install
@@ -254,6 +301,35 @@ return {
local ensure_installed = vim.tbl_keys(servers or {})
vim.list_extend(ensure_installed, {
'stylua', -- Used to format Lua code
'arduino-language-server',
'bash-debug-adapter',
'bash-language-server',
'clang-format',
'clangd',
'cmake-language-server',
'cmakelang',
'cpplint',
'cpptools',
'css-lsp',
'css-variables-language-server',
'cssmodules-language-server',
'delve',
'emmet-language-server',
'goimports-reviser',
'golangci-lint',
'golangci-lint-langserver',
'gopls',
'gradle-language-server',
'html-lsp',
'htmlhint',
'htmx-lsp',
'hyprls',
'json-lsp',
'jsonlint',
'lemminx',
'lua-language-server',
'pyright',
'xmlformatter',
})
require('mason-tool-installer').setup { ensure_installed = ensure_installed }

View File

@@ -9,7 +9,7 @@ return {
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
'MunifTanjim/nui.nvim',
},
cmd = 'Neotree',
lazy = false,
keys = {
{ '\\', ':Neotree reveal<CR>', desc = 'NeoTree reveal', silent = true },
},

View File

@@ -17,7 +17,7 @@ return {
-- 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'
end,
},
}

View File

@@ -1,11 +1,29 @@
return {
{ -- Highlight, edit, and navigate code
'nvim-treesitter/nvim-treesitter',
branch = 'main',
build = ':TSUpdate',
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
opts = {
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
ensure_installed = {
'bash',
'c',
'diff',
'html',
'lua',
'luadoc',
'markdown',
'markdown_inline',
'query',
'vim',
'vimdoc',
'rust',
'go',
'html',
'javascript',
'python',
},
-- Autoinstall languages that are not installed
auto_install = true,
highlight = {

View File

@@ -18,7 +18,7 @@ return {
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
opts = {
-- delay between pressing a key and opening which-key (milliseconds)
-- this setting is independent of vim.opt.timeoutlen
-- this setting is independent of vim.o.timeoutlen
delay = 0,
icons = {
-- set icon mappings to true if you have a Nerd Font

View File

@@ -7,7 +7,10 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
if vim.v.shell_error ~= 0 then
error('Error cloning lazy.nvim:\n' .. out)
end
end ---@diagnostic disable-next-line: undefined-field
vim.opt.rtp:prepend(lazypath)
end
---@type vim.Option
local rtp = vim.opt.rtp
rtp:prepend(lazypath)
-- vim: ts=2 sts=2 sw=2 et

View File

@@ -11,7 +11,7 @@
-- NOTE: Here is where you install your plugins.
require('lazy').setup({
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
'NMAC427/guess-indent.nvim', -- Detect tabstop and shiftwidth automatically
-- NOTE: Plugins can also be added by using a table,
-- with the first argument being the link and the following
@@ -20,29 +20,30 @@ require('lazy').setup({
-- Use `opts = {}` to automatically pass options to a plugin's `setup()` function, forcing the plugin to be loaded.
--
-- modular approach: using `require 'path/name'` will
-- modular approach: using `require 'path.name'` will
-- include a plugin definition from file lua/path/name.lua
require 'kickstart/plugins/gitsigns',
require 'kickstart.plugins.gitsigns',
require 'kickstart/plugins/which-key',
require 'kickstart.plugins.which-key',
require 'kickstart/plugins/telescope',
require 'kickstart.plugins.telescope',
require 'kickstart/plugins/lspconfig',
require 'kickstart.plugins.lspconfig',
require 'kickstart/plugins/conform',
require 'kickstart.plugins.conform',
require 'kickstart/plugins/cmp',
require 'kickstart.plugins.blink-cmp',
require 'kickstart/plugins/tokyonight',
require 'kickstart.plugins.tokyonight',
require 'kickstart/plugins/todo-comments',
require 'kickstart.plugins.todo-comments',
require 'kickstart/plugins/mini',
require 'kickstart.plugins.mini',
require 'kickstart/plugins/treesitter',
require 'kickstart.plugins.treesitter',
require 'kickstart.plugins.neo-tree',
-- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the
-- init.lua. If you want these files, they are in the repository, so you can just download them and
@@ -53,17 +54,16 @@ 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.debug',
-- require 'kickstart.plugins.indent_line',
-- require 'kickstart.plugins.lint',
-- require 'kickstart.plugins.autopairs',
-- require 'kickstart.plugins.neo-tree',
require 'kickstart.plugins.autopairs',
-- 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!

View File

@@ -1,69 +1,74 @@
-- [[ Setting options ]]
-- See `:help vim.opt`
-- See `:help vim.o`
-- NOTE: You can change these options as you wish!
-- For more options, you can see `:help option-list`
-- Make line numbers default
vim.opt.number = true
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.opt.relativenumber = true
-- vim.o.relativenumber = true
-- Enable mouse mode, can be useful for resizing splits for example!
vim.opt.mouse = 'a'
vim.o.mouse = 'a'
-- Don't show the mode, since it's already in the status line
vim.opt.showmode = false
vim.o.showmode = false
-- Sync clipboard between OS and Neovim.
-- Schedule the setting after `UiEnter` because it can increase startup-time.
-- Remove this option if you want your OS clipboard to remain independent.
-- See `:help 'clipboard'`
vim.schedule(function()
vim.opt.clipboard = 'unnamedplus'
vim.o.clipboard = 'unnamedplus'
end)
-- Enable break indent
vim.opt.breakindent = true
vim.o.breakindent = true
-- Save undo history
vim.opt.undofile = true
vim.o.undofile = true
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
vim.opt.ignorecase = true
vim.opt.smartcase = true
vim.o.ignorecase = true
vim.o.smartcase = true
-- Keep signcolumn on by default
vim.opt.signcolumn = 'yes'
vim.o.signcolumn = 'yes'
-- Decrease update time
vim.opt.updatetime = 250
vim.o.updatetime = 250
-- Decrease mapped sequence wait time
vim.opt.timeoutlen = 300
vim.o.timeoutlen = 300
-- Configure how new splits should be opened
vim.opt.splitright = true
vim.opt.splitbelow = true
vim.o.splitright = true
vim.o.splitbelow = true
-- Sets how neovim will display certain whitespace characters in the editor.
-- See `:help 'list'`
-- and `:help 'listchars'`
vim.opt.list = true
--
-- Notice listchars is set using `vim.opt` instead of `vim.o`.
-- It is very similar to `vim.o` but offers an interface for conveniently interacting with tables.
-- See `:help lua-options`
-- and `:help lua-options-guide`
vim.o.list = true
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '' }
-- Preview substitutions live, as you type!
vim.opt.inccommand = 'split'
vim.o.inccommand = 'split'
-- Show which line your cursor is on
vim.opt.cursorline = true
vim.o.cursorline = true
-- Minimal number of screen lines to keep above and below the cursor.
vim.opt.scrolloff = 10
vim.o.scrolloff = 10
-- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
-- instead raise a dialog asking if you wish to save the current file(s)
-- See `:help 'confirm'`
vim.opt.confirm = true
vim.o.confirm = true
-- vim: ts=2 sts=2 sw=2 et