This commit is contained in:
Dino 2026-04-29 15:42:07 +03:00
parent 3338d39206
commit 9ab4749b2d
21 changed files with 364 additions and 17 deletions

6
after/ftplugin/vala.lua Normal file
View File

@ -0,0 +1,6 @@
-- Set indentation for Vala files
vim.bo.shiftwidth = 4 -- number of spaces for each indent
vim.bo.tabstop = 4 -- display width of a tab
vim.bo.expandtab = true -- convert tabs to spaces
vim.bo.smartindent = true
vim.bo.commentstring = '// %s'

View File

@ -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`
@ -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'
@ -185,10 +185,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
@ -200,10 +200,10 @@ vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower win
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
-- NOTE: Some terminals have colliding keymaps or are not able to send distinct keycodes
-- vim.keymap.set("n", "<C-S-h>", "<C-w>H", { desc = "Move window to the left" })
-- vim.keymap.set("n", "<C-S-l>", "<C-w>L", { desc = "Move window to the right" })
-- vim.keymap.set("n", "<C-S-j>", "<C-w>J", { desc = "Move window to the lower" })
-- vim.keymap.set("n", "<C-S-k>", "<C-w>K", { desc = "Move window to the upper" })
vim.keymap.set('n', '<C-S-h>', '<C-w>H', { desc = 'Move window to the left' })
vim.keymap.set('n', '<C-S-l>', '<C-w>L', { desc = 'Move window to the right' })
vim.keymap.set('n', '<C-S-j>', '<C-w>J', { desc = 'Move window to the lower' })
vim.keymap.set('n', '<C-S-k>', '<C-w>K', { desc = 'Move window to the upper' })
-- [[ Basic Autocommands ]]
-- See `:help lua-guide-autocommands`
@ -403,6 +403,7 @@ require('lazy').setup({
-- [[ Configure Telescope ]]
-- See `:help telescope` and `:help telescope.setup()`
local actions = require 'telescope.actions'
require('telescope').setup {
-- You can put your default mappings / updates / etc. in here
-- All the info you're looking for is in `:help telescope.setup()`
@ -413,6 +414,15 @@ require('lazy').setup({
-- },
-- },
-- pickers = {}
pickers = {
buffers = {
mappings = {
i = {
['<c-b>'] = actions.delete_buffer, -- + actions.move_selection_previous,
},
},
},
},
extensions = {
['ui-select'] = {
require('telescope.themes').get_dropdown(),
@ -671,6 +681,8 @@ require('lazy').setup({
-- - 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 = {
gdtoolkit = {},
vala_ls = {},
-- clangd = {},
-- gopls = {},
-- pyright = {},
@ -768,6 +780,7 @@ require('lazy').setup({
end,
formatters_by_ft = {
lua = { 'stylua' },
gdscript = { 'gdformat' },
-- Conform can also run multiple formatters sequentially
-- python = { "isort", "black" },
--
@ -944,7 +957,7 @@ require('lazy').setup({
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', 'gdscript', 'php', 'vala' },
-- Autoinstall languages that are not installed
auto_install = true,
highlight = {
@ -973,18 +986,18 @@ 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.lint',
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.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!
@ -1012,5 +1025,24 @@ require('lazy').setup({
},
})
local is_listening = false
vim.lsp.config('gdscript', {
on_attach = function(_client, _bufnr)
if is_listening == false then
is_listening = true
vim.fn.serverstart '/tmp/godot.pipe'
end
end,
})
vim.lsp.enable 'gdscript'
-- require('lspconfig').vala_ls.setup {
-- -- defaults, no need to specify these
-- cmd = { 'vala-language-server' },
-- filetypes = { 'vala', 'genie' },
-- root_dir = root_pattern('meson.build', '.git'),
-- single_file_support = true,
-- commentstring = '//%s',
-- }
-- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et

View File

@ -0,0 +1,15 @@
return {
'axkirillov/hbac.nvim',
config = true,
opts = {
autoclose = true, -- set autoclose to false if you want to close manually
threshold = 32, -- hbac will start closing unedited buffers once that number is reached
close_command = function(bufnr)
vim.api.nvim_buf_delete(bufnr, {})
end,
close_buffers_with_windows = false, -- hbac will close buffers with associated windows if this option is `true`
telescope = {
-- See #telescope-configuration below
},
},
}

View File

@ -0,0 +1,11 @@
return {
'crnvl96/lazydocker.nvim',
event = 'VeryLazy',
opts = {}, -- automatically calls `require("lazydocker").setup()`
dependencies = {
'MunifTanjim/nui.nvim',
},
keys = {
{ '<leader>ld', '<cmd>LazyDocker<cr>', desc = 'LazyDocker' },
},
}

View File

@ -0,0 +1,3 @@
return {
'sindrets/diffview.nvim',
}

View File

@ -0,0 +1 @@
return { 'kevinhwang91/nvim-hlslens' }

View File

@ -0,0 +1,20 @@
return {
'kdheepak/lazygit.nvim',
lazy = true,
cmd = {
'LazyGit',
'LazyGitConfig',
'LazyGitCurrentFile',
'LazyGitFilter',
'LazyGitFilterCurrentFile',
},
-- optional for floating window border decoration
dependencies = {
'nvim-lua/plenary.nvim',
},
-- setting the keybinding for LazyGit with 'keys' is recommended in
-- order to load the plugin when the command is run for the first time
keys = {
{ '<leader>lg', '<cmd>LazyGit<cr>', desc = 'LazyGit' },
},
}

View File

@ -0,0 +1,34 @@
return {
'coffebar/neovim-project',
opts = {
projects = { -- define project roots
'~/project/dinobits/games/*',
'~/project/dinobits/work/*/*',
'~/project/linux/*',
'~/project/jams/*/*',
'~/.config/*',
},
picker = {
type = 'telescope', -- one of "telescope", "fzf-lua", or "snacks"
},
},
init = function()
-- enable saving the state of plugins in the session
vim.opt.sessionoptions:append 'globals' -- save global variables that start with an uppercase letter and contain at least one lowercase letter.
end,
dependencies = {
{ 'nvim-lua/plenary.nvim' },
-- optional picker
{ 'nvim-telescope/telescope.nvim', tag = '0.1.4' },
-- optional picker
{ 'ibhagwan/fzf-lua' },
-- optional picker
{ 'folke/snacks.nvim' },
{ 'Shatur/neovim-session-manager' },
},
lazy = false,
priority = 100,
keys = {
{ '<leader>sp', ':NeovimProjectDiscover<CR>', desc = 'Neovim [P]roject Discover ([S]earch)', silent = true },
},
}

View File

@ -0,0 +1,126 @@
return {
-- {
-- 'rest-nvim/rest.nvim',
-- dependencies = {
-- 'nvim-treesitter/nvim-treesitter',
-- opts = function(_, opts)
-- opts.ensure_installed = opts.ensure_installed or {}
-- table.insert(opts.ensure_installed, 'http')
-- end,
-- },
-- },
-- {
-- 'vhyrro/luarocks.nvim',
-- priority = 1000,
-- config = true,
-- opts = {
-- -- luarocks_build_args = {
-- -- '--with-lua-bin=/usr/bin/lua',
-- -- },
-- rocks = { 'lua-curl', 'nvim-nio', 'mimetypes', 'xml2lua' },
-- },
-- },
}
-- {
-- 'rest-nvim/rest.nvim',
-- ft = 'http',
-- dependencies = { 'luarocks.nvim' },
-- config = function()
-- local default_config = {
-- client = 'curl',
-- env_file = '.env',
-- env_pattern = '\\.env$',
-- env_edit_command = 'tabedit',
-- encode_url = true,
-- skip_ssl_verification = false,
-- custom_dynamic_variables = {},
-- logs = {
-- level = 'info',
-- save = true,
-- },
-- result = {
-- split = {
-- horizontal = false,
-- in_place = false,
-- stay_in_current_window_after_split = true,
-- },
-- behavior = {
-- decode_url = true,
-- show_info = {
-- url = true,
-- headers = true,
-- http_info = true,
-- curl_command = true,
-- },
-- statistics = {
-- enable = true,
-- ---@see https://curl.se/libcurl/c/curl_easy_getinfo.html
-- stats = {
-- { 'total_time', title = 'Time taken:' },
-- { 'size_download_t', title = 'Download size:' },
-- },
-- },
-- formatters = {
-- json = 'jq',
-- html = function(body)
-- if vim.fn.executable 'tidy' == 0 then
-- return body, { found = false, name = 'tidy' }
-- end
-- local fmt_body = vim.fn
-- .system({
-- 'tidy',
-- '-i',
-- '-q',
-- '--tidy-mark',
-- 'no',
-- '--show-body-only',
-- 'auto',
-- '--show-errors',
-- '0',
-- '--show-warnings',
-- '0',
-- '-',
-- }, body)
-- :gsub('\n$', '')
--
-- return fmt_body, { found = true, name = 'tidy' }
-- end,
-- },
-- },
-- keybinds = {
-- buffer_local = true,
-- prev = 'H',
-- next = 'L',
-- },
-- },
-- highlight = {
-- enable = true,
-- timeout = 750,
-- },
-- ---Example:
-- ---
-- ---```lua
-- ---keybinds = {
-- --- {
-- --- "<localleader>rr", "<cmd>Rest run<cr>", "Run request under the cursor",
-- --- },
-- --- {
-- --- "<localleader>rl", "<cmd>Rest run last<cr>", "Re-run latest request",
-- --- },
-- ---}
-- ---
-- ---```
-- ---@see vim.keymap.set
-- keybinds = {},
--
-- --- {
-- --- "<localleader>rr", "<cmd>Rest run<cr>", "Run request under the cursor",
-- --- },
-- --- {
-- --- "<localleader>rl", "<cmd>Rest run last<cr>", "Re-run latest request",
-- --- },
-- }
-- require('rest-nvim').setup(default_config)
-- end,
-- },
-- }

View File

@ -0,0 +1,15 @@
return {
'petertriho/nvim-scrollbar',
dependencies = {
'lewis6991/gitsigns.nvim',
'kevinhwang91/nvim-hlslens',
},
config = function()
require 'gitsigns'
require('scrollbar').setup()
require('scrollbar.handlers.gitsigns').setup()
require('scrollbar.handlers.search').setup {
-- hlslens config overrides
}
end,
}

View File

@ -0,0 +1,15 @@
return {
'akinsho/toggleterm.nvim',
version = '*',
config = true,
-- opts = {--[[ things you want to change go here]] },
keys = {
{ '<leader>tt', '<cmd>ToggleTerm<cr>', desc = 'ToggleTerm' },
{ '<C-\\><C-\\>', '<cmd>ToggleTerm<cr>', mode = 'n', desc = 'ToggleTerm' },
{ '<C-\\><C-\\>', '<C-\\><C-n><cmd>ToggleTerm<cr>', mode = 't', desc = 'ToggleTerm' },
{ '<C-`>', '<cmd>ToggleTerm<cr>', mode = 'n', desc = 'ToggleTerm' },
{ '<C-`>', '<C-\\><C-n><cmd>ToggleTerm<cr>', mode = 't', desc = 'ToggleTerm' },
-- vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
-- vim.keymap.set('t', '<C-\\><C-\\>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
},
}

View File

@ -0,0 +1,8 @@
return {
{
'mbbill/undotree',
config = function()
vim.keymap.set('n', '<leader><F5>', vim.cmd.UndotreeToggle, { desc = 'UndotreeToggle' })
end,
},
}

View File

@ -0,0 +1,17 @@
return {
'kristijanhusak/vim-dadbod-ui',
dependencies = {
{ 'tpope/vim-dadbod', lazy = true },
{ 'kristijanhusak/vim-dadbod-completion', ft = { 'sql', 'mysql', 'plsql' }, lazy = true },
},
cmd = {
'DBUI',
'DBUIToggle',
'DBUIAddConnection',
'DBUIFindBuffer',
},
init = function()
-- Your DBUI configuration
vim.g.db_ui_use_nerd_fonts = 1
end,
}

View File

@ -0,0 +1 @@
return { 'tpope/vim-dotenv' }

View File

@ -0,0 +1,3 @@
return {
'tpope/vim-fugitive',
}

View File

@ -0,0 +1,3 @@
return {
'kshenoy/vim-signature',
}

View File

@ -0,0 +1,3 @@
return {
'mhinz/vim-signify',
}

View File

@ -0,0 +1 @@
return { 'wakatime/vim-wakatime', lazy = false }

View File

@ -80,6 +80,20 @@ return {
config = function()
local dap = require 'dap'
local dapui = require 'dapui'
dap.adapters.godot = {
type = 'server',
host = '127.0.0.1',
port = 6006,
}
dap.configurations.gdscript = {
{
type = 'godot',
request = 'launch',
name = 'Launch scene',
project = '${workspaceFolder}',
},
}
require('mason-nvim-dap').setup {
-- Makes a best effort to setup the various debuggers with

View File

@ -6,6 +6,14 @@ return {
{
'lewis6991/gitsigns.nvim',
opts = {
current_line_blame_opts = {
virt_text = true,
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
delay = 10,
ignore_whitespace = false,
virt_text_priority = 100,
use_focus = true,
},
on_attach = function(bufnr)
local gitsigns = require 'gitsigns'

View File

@ -20,6 +20,17 @@ return {
['\\'] = 'close_window',
},
},
filtered_items = {
hide_by_pattern = { -- uses glob style patterns
'*.uid',
'*.tscn',
'*.scn',
'*.tres',
'*.res',
'*.meta',
--"*/src/*/tsconfig.json",
},
},
},
},
}