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
6 changes: 6 additions & 0 deletions after/ftplugin/vala.lua
Original file line number Diff line number Diff line change
@@ -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'
66 changes: 49 additions & 17 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 @@ -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
Expand All @@ -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`
Expand Down Expand Up @@ -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()`
Expand All @@ -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(),
Expand Down Expand Up @@ -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 = {},
Expand Down Expand Up @@ -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" },
--
Expand Down Expand Up @@ -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 = {
Expand Down Expand Up @@ -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!
Expand Down Expand Up @@ -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
15 changes: 15 additions & 0 deletions lua/custom/plugins/hbac.nvim.lua
Original file line number Diff line number Diff line change
@@ -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
},
},
}
11 changes: 11 additions & 0 deletions lua/custom/plugins/lazydocker.lua
Original file line number Diff line number Diff line change
@@ -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' },
},
}
23 changes: 23 additions & 0 deletions lua/custom/plugins/nvim-claudecode.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
return {
'coder/claudecode.nvim',
dependencies = { 'folke/snacks.nvim' },
config = true,
keys = {
{ '<leader>a', nil, desc = 'AI/Claude Code' },
{ '<leader>ac', '<cmd>ClaudeCode<cr>', desc = 'Toggle Claude' },
{ '<leader>af', '<cmd>ClaudeCodeFocus<cr>', desc = 'Focus Claude' },
{ '<leader>ar', '<cmd>ClaudeCode --resume<cr>', desc = 'Resume Claude' },
{ '<leader>aC', '<cmd>ClaudeCode --continue<cr>', desc = 'Continue Claude' },
{ '<leader>am', '<cmd>ClaudeCodeSelectModel<cr>', desc = 'Select Claude model' },
{ '<leader>ab', '<cmd>ClaudeCodeAdd %<cr>', desc = 'Add current buffer' },
{ '<leader>as', '<cmd>ClaudeCodeSend<cr>', mode = 'v', desc = 'Send to Claude' },
{
'<leader>as',
'<cmd>ClaudeCodeTreeAdd<cr>',
desc = 'Add file',
ft = { 'NvimTree', 'neo-tree', 'oil', 'minifiles', 'netrw' },
},
{ '<leader>aa', '<cmd>ClaudeCodeDiffAccept<cr>', desc = 'Accept diff' },
{ '<leader>ad', '<cmd>ClaudeCodeDiffDeny<cr>', desc = 'Deny diff' },
},
}
3 changes: 3 additions & 0 deletions lua/custom/plugins/nvim-diffview.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
return {
'sindrets/diffview.nvim',
}
1 change: 1 addition & 0 deletions lua/custom/plugins/nvim-hlslens.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
return { 'kevinhwang91/nvim-hlslens' }
20 changes: 20 additions & 0 deletions lua/custom/plugins/nvim-lazygit.lua
Original file line number Diff line number Diff line change
@@ -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' },
},
}
34 changes: 34 additions & 0 deletions lua/custom/plugins/nvim-project.lua
Original file line number Diff line number Diff line change
@@ -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 },
},
}
126 changes: 126 additions & 0 deletions lua/custom/plugins/nvim-rest.lua
Original file line number Diff line number Diff line change
@@ -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,
-- },
-- }
Loading
Loading