This commit is contained in:
Trevor Vallender 2023-11-16 19:50:07 +00:00
parent 4bae40bb29
commit 868cba50d9
8 changed files with 161 additions and 7 deletions

View File

@ -36,11 +36,6 @@ PS1+=' $(__git_ps1 [$YELLOW%s$CLEAR]) \n'
PS1+="➮ \[$BOLD\]"
trap 'printf "\033[0m" >&2' DEBUG
if command -v fzf-share >/dev/null; then
source "$(fzf-share)/key-bindings.bash"
source "$(fzf-share)/completion.bash"
fi
# If not running interactively, don't do anything
case $- in
*i*) ;;
@ -105,3 +100,5 @@ if ! shopt -oq posix; then
fi
eval "$(~/.rbenv/bin/rbenv init - bash)"
[ -f ~/.fzf.bash ] && source ~/.fzf.bash

View File

@ -16,6 +16,7 @@
aap = !git add --intent-to-add . && git add --patch
br = branch
cb = clone --bare
cp = cherry-pick
co = checkout
cm = commit
cma = commit --amend

View File

@ -0,0 +1,33 @@
## name: Gruvbox Dark Soft
## author: Pavel Pertsev
## license: MIT/X11
## upstream: https://raw.githubusercontent.com/gruvbox-community/gruvbox-contrib/master/kitty/gruvbox-dark-soft.conf
selection_foreground #ebdbb2
selection_background #d65d0e
background #32302f
foreground #ebdbb2
color0 #3c3836
color1 #cc241d
color2 #98971a
color3 #d79921
color4 #458588
color5 #b16286
color6 #689d6a
color7 #a89984
color8 #928374
color9 #fb4934
color10 #b8bb26
color11 #fabd2f
color12 #83a598
color13 #d3869b
color14 #8ec07c
color15 #fbf1c7
cursor #bdae93
cursor_text_color #665c54
url_color #458588

10
.config/kitty/kitty.conf Normal file
View File

@ -0,0 +1,10 @@
font_family JetBrainsMono Nerd Font
italic_font Source Code Pro
bold_italic_font Source Code Pro
font_size 10.0
include gruvbox_dark_soft.conf
background_opacity 0.95
enable_audio_bell no
window_padding_width 10
disable_ligatures cursor

View File

@ -7,7 +7,7 @@ set.softtabstop = 2
set.expandtab = true
set.number = true
set.relativenumber = true
set.mouse='r'
--set.mouse='r'
--- Plugins
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
@ -54,6 +54,8 @@ require("lazy").setup({
"mfussenegger/nvim-dap",
"rcarriga/nvim-dap-ui",
"chaoren/vim-wordmotion",
"tpope/vim-fugitive",
"tpope/vim-surround",
})
require("tsv.remap")
@ -66,6 +68,21 @@ require("gruvbox").setup({
})
vim.cmd([[colorscheme gruvbox]])
local _border = "single"
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(
vim.lsp.handlers.hover, {
border = _border
}
)
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(
vim.lsp.handlers.signature_help, {
border = _border
}
)
vim.diagnostic.config{
float={border=_border}
}
-- Improve terminal setup
vim.api.nvim_command("autocmd TermOpen * startinsert")
vim.api.nvim_command("autocmd TermOpen * setlocal nonumber norelativenumber")
@ -126,6 +143,79 @@ cmp.setup {
})
}
local capabilities = require('cmp_nvim_lsp').default_capabilities()
--
--Enable (broadcasting) snippet capability for completion
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true
require"lspconfig".ruby_ls.setup{}
-- LSP servers
-- Stimulus
require'lspconfig'.stimulus_ls.setup{}
-- Ruby
require'lspconfig'.ruby_ls.setup{}
-- CSS
require'lspconfig'.cssls.setup {
capabilities = capabilities,
}
-- SQL
require'lspconfig'.sqlls.setup{}
-- JavaScript
require'lspconfig'.eslint.setup{}
-- HTML
require'lspconfig'.html.setup {
capabilities = capabilities,
}
-- JSON
require'lspconfig'.jsonls.setup {
capabilities = capabilities,
}
-- BASH
require'lspconfig'.bashls.setup{}
-- Cucumber
require'lspconfig'.cucumber_language_server.setup{}
-- Docker
require'lspconfig'.dockerls.setup{}
require'lspconfig'local dap, dapui = require("dap"), require("dapui")
dap.listeners.after.event_initialized["dapui_config"] = function()
dapui.open()
end
dap.listeners.before.event_terminated["dapui_config"] = function()
dapui.close()
end
dap.listeners.before.event_exited["dapui_config"] = function()
dapui.close()
end
require("dapui").setup()
dap.adapters.ruby = function(callback, config)
callback {
type = "server",
host = "127.0.0.1",
port = "${port}",
executable = {
command = "bundle",
args = { "exec", "rdbg", "-n", "--open", "--port", "${port}",
"-c", "--", "bundle", "exec", config.command, config.script,
},
},
}
end
dap.configurations.ruby = {
{
type = "ruby",
name = "debug current file",
request = "attach",
localfs = true,
command = "ruby",
script = "${file}",
},
{
type = "ruby",
name = "run current spec file",
request = "attach",
localfs = true,
command = "rspec",
script = "${file}",
},
}

View File

@ -9,6 +9,7 @@
"mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" },
"nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" },
"nvim-dap": { "branch": "master", "commit": "9d81c11fd185a131f81841e64941859305f6c42d" },
"nvim-dap-ruby": { "branch": "main", "commit": "fc15c7d50e557379e13f3a825bc58adcc7323cc3" },
"nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" },
"nvim-lspconfig": { "branch": "master", "commit": "b0852218bc5fa6514a71a9da6d5cfa63a263c83d" },
"nvim-tree.lua": { "branch": "master", "commit": "a2aaf8b430c11af36b869cf1c0ad2f7c8ceeaf2c" },
@ -16,6 +17,8 @@
"nvim-web-devicons": { "branch": "master", "commit": "47103b80c38c59f7a1b5408c232b92bf5d018651" },
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
"telescope.nvim": { "branch": "master", "commit": "7011eaae0ac1afe036e30c95cf80200b8dc3f21a" },
"vim-fugitive": { "branch": "master", "commit": "46eaf8918b347906789df296143117774e827616" },
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
"vim-wordmotion": { "branch": "master", "commit": "81d9bd298376ab0dc465c85d55afa4cb8d5f47a1" },
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }
}

View File

@ -37,6 +37,13 @@ vim.keymap.set('n', '<leader>tlq', vim.diagnostic.setloclist, {})
vim.keymap.set('n', 'P', vim.diagnostic.open_float, {})
vim.keymap.set('n', 'H', function() vim.lsp.buf.hover() end, opts)
vim.keymap.set("n", "<leader>tlf", vim.lsp.buf.format) -- Format code
-- DAP
vim.keymap.set('n', '<leader>db', require('dap').toggle_breakpoint)
vim.keymap.set('n', '<leader>dc', require('dap').continue)
vim.keymap.set('n', '<leader>di', require('dap').step_into)
vim.keymap.set('n', '<leader>do', require('dap').step_over)
vim.keymap.set('n', '<leader>dr', require('dap').repl.open)
vim.keymap.set('n', '<leader>dx', require('dap').terminate)
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float)

13
.fzf.bash Normal file
View File

@ -0,0 +1,13 @@
# Setup fzf
# ---------
if [[ ! "$PATH" == */home/tsv/.fzf/bin* ]]; then
PATH="${PATH:+${PATH}:}/home/tsv/.fzf/bin"
fi
# Auto-completion
# ---------------
source "/home/tsv/.fzf/shell/completion.bash"
# Key bindings
# ------------
source "/home/tsv/.fzf/shell/key-bindings.bash"