Skip to content

Commit

Permalink
snippets for rails
Browse files Browse the repository at this point in the history
  • Loading branch information
danwetherald committed Oct 26, 2023
1 parent c63ab37 commit 4281e9b
Show file tree
Hide file tree
Showing 5 changed files with 345 additions and 177 deletions.
92 changes: 34 additions & 58 deletions kitty/kitty.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,63 +2,39 @@
# Kitty Configuration File
# For configuration options, see https://sw.kovidgoyal.net/kitty/conf.html

# vim:fileencoding=utf-8:ft=conf:foldmethod=marker

# Fonts {{{

# font_family Operator Mono Lig Book
# bold_font Operator Mono Medium
# italic_font Operator Mono Lig Book Italic
# bold_italic_font Operator Mono Medium Italic
# font_size 14.0

# font_family Victor Mono
# bold_font Victor Mono Bold
# italic_font Victor Mono Medium Italic
# bold_italic_font Victor Mono Bold Italic
# font_size 14.0

# font_family Iosevka Term
# bold_font auto
# italic_font auto
# bold_italic_font auto
# font_size 16.0

font_family JetBrainsMono Nerd Font Mono Regular
bold_font JetBrainsMono Nerd Font Mono Bold
italic_font JetBrainsMono Nerd Font Mono Italic
bold_italic_font JetBrainsMono Nerd Font Mono Bold Italic
font_size 14.0

disable_ligatures never
# Use the 3270 Medium Nerd Font for these symbols,
# allowing for nerd fonts to be used with whatever font without
# requiring the font to be patched.
# symbol_map U+23FB-U+23FE,U+2B58,U+E200-U+E2A9,U+E0A0-U+E0A3,U+E0B0-U+E0BF,U+E0C0-U+E0C8,U+E0CC-U+E0CF,U+E0D0-U+E0D2,U+E0D4,U+E700-U+E7C5,U+F000-U+F2E0,U+2665,U+26A1,U+F400-U+F4A8,U+F67C,U+E000-U+E00A,U+F300-U+F313,U+E5FA-U+E62B 3270Medium Nerd Font Mono Medium
# }}}


# Window {{{
# window_padding_width 1.0
# macos_titlebar_color background
# macos_show_window_title_in none
hide_window_decorations yes
# }}}

# Tab bar {{{
# tab_bar_style powerline
# active_tab_title_template {index}: {title}
# active_tab_foreground #000
# active_tab_background #FFF
# active_tab_font_style bold-italic
# inactive_tab_foreground #444
# inactive_tab_background #999
# inactive_tab_font_style normal
# tab_bar_background #FFF
# }}}


# Layouts {{{
# }}}
# font_family Operator Mono Lig Book
# bold_font Operator Mono Medium
# italic_font Operator Mono Lig Book Italic
# bold_italic_font Operator Mono Medium Italic
# font_size 14.0

# font_family JetBrainsMono Nerd Font Mono Regular
# bold_font JetBrainsMono Nerd Font Mono Bold
# italic_font JetBrainsMono Nerd Font Mono Italic
# bold_italic_font JetBrainsMono Nerd Font Mono Bold Italic
# font_size 14.0

font_family Victor Mono
bold_font Victor Mono Bold
italic_font Victor Mono Italic
bold_italic_font Victor Mono Italic
font_size 14.0

# disable_ligatures never

# window_padding_width 1.0
# macos_titlebar_color background
# macos_show_window_title_in none
hide_window_decorations yes

# tab_bar_style powerline
# active_tab_title_template {index}: {title}
# active_tab_foreground #000
# active_tab_background #FFF
# active_tab_font_style bold-italic
# inactive_tab_foreground #444
# inactive_tab_background #999
# inactive_tab_font_style normal
# tab_bar_background #FFF

include tokyonight.conf
85 changes: 53 additions & 32 deletions nvim_custom/chadrc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,62 @@ local M = {}

-- Custom UI / Theme
M.ui = {
theme = "nightfox",

tabufline = {
enabled = false,
},

nvdash = {
load_on_startup = false,
header = {
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣠⣤⣤⣶⣶⣶⣶⣶⣦⣤⣤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⢰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠸⣿⣿⣿⣿⠿⠿⠿⢿⣿⣿⣿⠿⠿⠿⣿⣿⣿⣿⣿⣿⣿⡿⠿⠿⢿⣿⣿⣿⡿⠿⠿⢿⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⢿⣿⣿⣿⡄⠀⠀⠸⢿⣿⠟⠀⠀⢠⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠘⢿⣿⡿⠁⠀⠀⣾⣿⣿⣿⠇⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣦⡀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⢀⣠⣾⣿⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣷⣾⣿⣿⣿⣿⣿⣿⠟⢹⠛⢿⣿⣿⣿⣿⣿⣿⣶⣿⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⠀⣸⡀⠀⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣠⣼⣿⣷⣤⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠁⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠉⠉⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⠉⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠈⠉⠁⠈⠉⠁⠉⠉⠀⠉⠉⠈⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
},
}
lsp_semantic_tokens = true,
hl_override = {
Comment = { italic = true },

String = { italic = true },

Character = { italic = true },
Boolean = { italic = true },
Float = { italic = true },

Function = { italic = true },

Conditional = { italic = true },
Repeat = { italic = true },
Label = { italic = true },
Operator = { italic = true },
Exception = { italic = true },

Underlined = { italic = true },
},

theme = "tokyonight",

tabufline = {
enabled = false,
},

nvdash = {
-- load_on_startup = true,
header = {
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣠⣤⣤⣶⣶⣶⣶⣶⣦⣤⣤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⢰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠸⣿⣿⣿⣿⠿⠿⠿⢿⣿⣿⣿⠿⠿⠿⣿⣿⣿⣿⣿⣿⣿⡿⠿⠿⢿⣿⣿⣿⡿⠿⠿⢿⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⢿⣿⣿⣿⡄⠀⠀⠸⢿⣿⠟⠀⠀⢠⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠘⢿⣿⡿⠁⠀⠀⣾⣿⣿⣿⠇⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣦⡀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⢀⣠⣾⣿⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣷⣾⣿⣿⣿⣿⣿⣿⠟⢹⠛⢿⣿⣿⣿⣿⣿⣿⣶⣿⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⠀⣸⡀⠀⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣠⣼⣿⣷⣤⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠁⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠉⠉⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⠉⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠈⠉⠁⠈⠉⠁⠉⠉⠀⠉⠉⠈⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
},
},
}

-- Custom mappings
M.mappings = require "custom.mappings"
M.mappings = require("custom.mappings")

-- Custom plugins
M.plugins = "custom.plugins"
Expand Down
13 changes: 9 additions & 4 deletions nvim_custom/init.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-- Close if only tree is open
vim.api.nvim_create_autocmd("BufEnter", {
command = "if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif",
nested = true,
command = "if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif",
nested = true,
})

vim.g.mapleader = ","
Expand All @@ -13,6 +13,11 @@ vim.opt.relativenumber = true
vim.opt.backup = false
vim.opt.writebackup = false
vim.opt.swapfile = false
-- vim.opt.updatecount = false

vim.opt.backspace = { "indent", "eol,start" }

-- Enable true colors
if vim.opt.termguicolors then
vim.opt.termguicolors = true
end

vim.g.vscode_snippets_path = "~/.config/nvim/lua/custom/snippets/json"
162 changes: 79 additions & 83 deletions nvim_custom/plugins.lua
Original file line number Diff line number Diff line change
@@ -1,102 +1,98 @@
local plugins = {
{
{
"neovim/nvim-lspconfig",
dependencies = {
{
-- format & linting
"jose-elias-alvarez/null-ls.nvim",
config = function()
require("custom.configs.null-ls")
end,
},
"jose-elias-alvarez/null-ls.nvim",
config = function()
require("custom.configs.null-ls")
end,
},
config = function()
require("plugins.configs.lspconfig")
require("custom.configs.lspconfig")
end,
},

{
"williamboman/mason.nvim",
opts = {
ensure_installed = {
-- lua
"lua-language-server",
"stylua",
{
"williamboman/mason.nvim",
opts = {
ensure_installed = {
-- lua
"lua-language-server",
"stylua",

-- web
"css-lsp",
"html-lsp",
"tailwindcss-language-server",
-- web
"css-lsp",
"html-lsp",
"tailwindcss-language-server",

-- misc
"yaml-language-server",
-- misc
"yaml-language-server",

-- rails
"ruby-lsp",
}
}
},
-- rails
"ruby-lsp",
},
},
},

{
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
"vim",
"html",
"css",
"javascript",
"json",
"toml",
"lua",
"ruby",
"dockerfile",
"typescript",
"tsx",
"yaml",
}
}
},
{
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
"vim",
"html",
"css",
"javascript",
"json",
"toml",
"lua",
"ruby",
"dockerfile",
"typescript",
"tsx",
"yaml",
},
},
},

{
"nvim-tree/nvim-tree.lua",
opts = {
diagnostics = {
enable = true,
},
git = {
enable = true,
ignore = false,
},
actions = {
open_file = {
quit_on_open = true,
window_picker = {
enable = false
}
}
}
}
},
{
"nvim-tree/nvim-tree.lua",
opts = {
diagnostics = {
enable = true,
},
git = {
enable = true,
ignore = false,
},
actions = {
open_file = {
quit_on_open = true,
window_picker = {
enable = false,
},
},
},
},
},
{
"L3MON4D3/LuaSnip",
dependencies = {
"rafamadriz/friendly-snippets",
config = function()
local ls = require("luasnip")

{
"lukas-reineke/indent-blankline.nvim",
opts = {
filetype_exclude = {
"help",
"terminal",
"alpha",
"packer",
"lspinfo",
"TelescopePrompt",
"TelescopeResults",
"nvchad_cheatsheet",
"lsp-installer",
"norg",
"",
},
}
}
ls.filetype_extend("ruby", { "rails" })
ls.filetype_extend("eruby", { "html", "rails", "ruby" })
end,
},
opts = {
filetype_extend = {
"eruby",
"ruby",
},
},
},
}

return plugins
Loading

0 comments on commit 4281e9b

Please sign in to comment.