Skip to content
Closed

Beta #1705

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
f54ae07
move plugins into their own files
peturparkur Jun 17, 2024
a65ca38
add pylsp and pyright
peturparkur Jun 18, 2024
db15bab
whoops forgot the separator
peturparkur Jun 18, 2024
3f99900
add mason util and lsp changes for current state
peturparkur Jun 19, 2024
a7ebd6f
configure lsps directly instead of with mason
peturparkur Jun 19, 2024
33554a5
add basedpyright and allow inlay hints by default
peturparkur Jun 21, 2024
7db85cf
better lsp handling + utility to only check mason if not found locall…
peturparkur Jun 27, 2024
5d516ba
move tokyonight to themes folder
peturparkur Jul 4, 2024
60ca677
add themes and change initial theme
peturparkur Jul 4, 2024
0ef7ddd
enable neo-tree
peturparkur Jul 4, 2024
f2e977c
remove on-attach print
peturparkur Jul 5, 2024
340e1ad
relative numbers
nagymathev Jul 10, 2024
ec42464
replace nixd with nil
nagymathev Jul 10, 2024
9f2234a
add rust lsp
nagymathev Jul 10, 2024
d3adf6a
markdown lsp
nagymathev Jul 10, 2024
27e1514
enable autopairs
nagymathev Jul 12, 2024
b6531e9
Merge pull request #1 from nagymathev/main
peturparkur Jul 26, 2024
3025004
fix alignment and add back nixd
peturparkur Jul 26, 2024
f207404
add toggleterm
peturparkur Jul 26, 2024
1b48ea8
Merge pull request #3 from peturparkur/peter
peturparkur Jul 26, 2024
6f49fd3
add gopls language server
peturparkur Aug 24, 2024
e8eeff8
add dockerfile and dockercompose LSPs + optional local enforcement
peturparkur Aug 24, 2024
10a6422
gopls explicit settings
peturparkur Aug 24, 2024
7f443fb
remove pylyzer and go compatible with inlay hints
peturparkur Aug 24, 2024
7eba0ef
lsp detection for docker compose yaml files
peturparkur Aug 28, 2024
990efd1
better filename and extension definition for docker-compose recognition
peturparkur Aug 29, 2024
24ec529
Configure LSPs via Languages and Profiles
peturparkur Aug 29, 2024
84e58e6
nixd additional configuration
peturparkur May 30, 2025
4e5abb3
add nil and formatting
peturparkur Jun 17, 2025
ffb4ed4
update which-key spec
peturparkur Jun 24, 2025
ffda44e
update lsp configuration + enable debug
peturparkur Jun 24, 2025
dcb979b
add blink.cmp
peturparkur Jun 24, 2025
5d01f03
disable treesitter indentation + comments
peturparkur Jun 24, 2025
4a68e93
swap nix language server order
peturparkur Jun 24, 2025
3807d7d
configure nix to my configuration
peturparkur Jun 24, 2025
115243d
python formatting
peturparkur Aug 2, 2025
2985d98
Beta (#4)
peturparkur Aug 3, 2025
14573da
remove telescope version branch + format (#5)
peturparkur Aug 3, 2025
2fa0eab
configure yamlls for kubernetes resources with extension .k8s.yaml (#6)
peturparkur Aug 3, 2025
c3c0b45
finally no double autocomplete (#7)
peturparkur Aug 17, 2025
d1aade1
almost no-op (#8)
peturparkur Aug 25, 2025
57c0b6c
new notation for setting up LSPs
peturparkur Aug 25, 2025
20385b2
add hinting to lua
peturparkur Aug 25, 2025
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
3 changes: 0 additions & 3 deletions doc/tags

This file was deleted.

639 changes: 80 additions & 559 deletions init.lua

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions lua/custom/plugins/toggleterm.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
return {
'akinsho/toggleterm.nvim',
version = '*',
opts = {},
config = function(_, opts)
require('toggleterm').setup {
open_mapping = [[<c-\>]],
direction = 'float',
}
end,
}
98 changes: 98 additions & 0 deletions lua/kickstart/plugins/autocomplete/blink-cmp.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
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 },
},
}
110 changes: 110 additions & 0 deletions lua/kickstart/plugins/autocomplete/nvim-cmp.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
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',
},
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 = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'path' },
},
}
end,
}
88 changes: 73 additions & 15 deletions lua/kickstart/plugins/debug.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,73 @@ 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
'leoluz/nvim-dap-go',
},
keys = {
-- Basic debugging keymaps, feel free to change to your liking!
{
'<F5>',
function()
require('dap').continue()
end,
desc = 'Debug: Start/Continue',
},
{
'<F1>',
function()
require('dap').step_into()
end,
desc = 'Debug: Step Into',
},
{
'<F2>',
function()
require('dap').step_over()
end,
desc = 'Debug: Step Over',
},
{
'<F3>',
function()
require('dap').step_out()
end,
desc = 'Debug: Step Out',
},
{
'<leader>b',
function()
require('dap').toggle_breakpoint()
end,
desc = 'Debug: Toggle Breakpoint',
},
{
'<leader>B',
function()
require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ')
end,
desc = 'Debug: Set Breakpoint',
},
-- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
{
'<F7>',
function()
require('dapui').toggle()
end,
desc = 'Debug: See last session result.',
},
},
config = function()
local dap = require 'dap'
local dapui = require 'dapui'

require('mason-nvim-dap').setup {
-- Makes a best effort to setup the various debuggers with
-- reasonable debug configurations
automatic_setup = true,
automatic_installation = true,

-- You can provide additional configuration to the handlers,
-- see mason-nvim-dap README for more information
Expand All @@ -45,16 +98,6 @@ return {
},
}

-- Basic debugging keymaps, feel free to change to your liking!
vim.keymap.set('n', '<F5>', dap.continue, { desc = 'Debug: Start/Continue' })
vim.keymap.set('n', '<F1>', dap.step_into, { desc = 'Debug: Step Into' })
vim.keymap.set('n', '<F2>', dap.step_over, { desc = 'Debug: Step Over' })
vim.keymap.set('n', '<F3>', dap.step_out, { desc = 'Debug: Step Out' })
vim.keymap.set('n', '<leader>b', dap.toggle_breakpoint, { desc = 'Debug: Toggle Breakpoint' })
vim.keymap.set('n', '<leader>B', function()
dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ')
end, { desc = 'Debug: Set Breakpoint' })

-- Dap UI setup
-- For more information, see |:help nvim-dap-ui|
dapui.setup {
Expand All @@ -77,14 +120,29 @@ return {
},
}

-- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
vim.keymap.set('n', '<F7>', dapui.toggle, { desc = 'Debug: See last session result.' })
-- 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

dap.listeners.after.event_initialized['dapui_config'] = dapui.open
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
dap.listeners.before.event_exited['dapui_config'] = dapui.close

-- Install golang specific config
require('dap-go').setup()
require('dap-go').setup {
delve = {
-- On Windows delve must be run attached or it crashes.
-- See https://github.com/leoluz/nvim-dap-go/blob/main/README.md#configuring
detached = vim.fn.has 'win32' == 0,
},
}
end,
}
4 changes: 2 additions & 2 deletions lua/kickstart/plugins/lint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ return {

-- To allow other plugins to add linters to require('lint').linters_by_ft,
-- instead set linters_by_ft like this:
-- lint.linters_by_ft = lint.linters_by_ft or {}
-- lint.linters_by_ft['markdown'] = { 'markdownlint' }
lint.linters_by_ft = lint.linters_by_ft or {}
lint.linters_by_ft['markdown'] = { 'markdownlint' }
--
-- However, note that this will enable a set of default linters,
-- which will cause errors unless these tools are available:
Expand Down
Loading
Loading