Skip to content

Commit

Permalink
🎨 (formated)
Browse files Browse the repository at this point in the history
  • Loading branch information
Comamoca committed Sep 12, 2024
1 parent a7f973c commit e229985
Show file tree
Hide file tree
Showing 26 changed files with 642 additions and 545 deletions.
16 changes: 12 additions & 4 deletions configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
catppuccin.enable = true;

networking.hostName = "comabook"; # Define your hostname.
networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.

# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
Expand All @@ -94,11 +94,19 @@
# NextDNS
services.nextdns = {
enable = true;
arguments = [ "-config" "10.0.3.0/24=abcdef" "-cache-size" "10MB" ];
arguments = [
"-config"
"10.0.3.0/24=abcdef"
"-cache-size"
"10MB"
];
};

# use NextDNS
networking.nameservers = [ "2a07:a8c0::f2:3b72" "2a07:a8c1::f2:3b72" ];
networking.nameservers = [
"2a07:a8c0::f2:3b72"
"2a07:a8c1::f2:3b72"
];

# Set your time zone.
time.timeZone = "Asia/Tokyo";
Expand Down Expand Up @@ -245,7 +253,7 @@
deno
wlogout
# wofi
];
];

# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
Expand Down
12 changes: 6 additions & 6 deletions dotfiles/config/ime/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ vim.keymap.set("i", "jj", "<C-[>")

-- kanagawa.nvim
require("kanagawa").setup({
compile = true,
undercurl = true,
commentStyle = { italic = true },
keywordStyle = { italic = true },
statementStyle = { bold = true },
transparent = true,
compile = true,
undercurl = true,
commentStyle = { italic = true },
keywordStyle = { italic = true },
statementStyle = { bold = true },
transparent = true,
})

vim.cmd("colorscheme kanagawa-dragon")
Expand Down
80 changes: 40 additions & 40 deletions dotfiles/config/ime/lua/ddc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,47 +4,47 @@ ddc_custom_patch_global("ui", "native")
-- vim.fn["ddc#custom#patch_global"]('completionMenu', 'pum.vim')

ddc_custom_patch_global("sources", {
-- "nvim-lsp",
-- "lsp",
-- "around",
-- "vsnip",
-- "file",
"skkeleton",
"emoji",
-- "nvim-lsp",
-- "lsp",
-- "around",
-- "vsnip",
-- "file",
"skkeleton",
"emoji",
})

ddc_custom_patch_global("sourceOptions", {
emoji = {
mark = "emoji",
matchers = { "emoji" },
sorters = {},
},
emoji = {
mark = "emoji",
matchers = { "emoji" },
sorters = {},
},
})

ddc_custom_patch_global("sourceOptions", {
_ = {
-- matchers = { "matcher_head" },
-- sorters = { "sorter_rank" },
_ = {
-- matchers = { "matcher_head" },
-- sorters = { "sorter_rank" },

matchers = { "matcher_fuzzy" },
sorters = { "sorter_fuzzy" },
converters = { "converter_fuzzy" },
keywordPattern = "[a-zA-Z_:]\\w*",
},
-- around = { mark = "around" },
matchers = { "matcher_fuzzy" },
sorters = { "sorter_fuzzy" },
converters = { "converter_fuzzy" },
keywordPattern = "[a-zA-Z_:]\\w*",
},
-- around = { mark = "around" },
})

vim.fn["ddc#custom#patch_filetype"]({ "ps1", "dosbatch", "autohotkey", "registry" }, {
sourceOptions = {
-- file = {
-- forceCompletionPattern = [[\S\\\S*]],
-- },
},
sourceParams = {
-- file = {
-- mode = "win32",
-- },
},
sourceOptions = {
-- file = {
-- forceCompletionPattern = [[\S\\\S*]],
-- },
},
sourceParams = {
-- file = {
-- mode = "win32",
-- },
},
})

-- ddc_custom_patch_global("sourceParams", {
Expand All @@ -62,13 +62,13 @@ inoremap <expr> <TAB>
]])

vim.api.nvim_create_autocmd("InsertEnter", {
callback = function(event)
vim.keymap.set("i", "<CR>", function()
if vim.fn.pumvisible() == 1 then
return "<C-y>"
else
return "<CR>"
end
end, { expr = true })
end,
callback = function(event)
vim.keymap.set("i", "<CR>", function()
if vim.fn.pumvisible() == 1 then
return "<C-y>"
else
return "<CR>"
end
end, { expr = true })
end,
})
8 changes: 4 additions & 4 deletions dotfiles/config/libskk/rules/StickyShift/keymap/common.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"define": {
"keymap": {
":": "upper-;"
}
"define": {
"keymap": {
":": "upper-;"
}
}
}
8 changes: 4 additions & 4 deletions dotfiles/config/libskk/rules/StickyShift/keymap/default.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"include": [
"default/default",
"common"
]
"include": [
"default/default",
"common"
]
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"include": [
"default"
],
"define": {
"keymap": {
"\\": "set-input-mode-hiragana"
}
"include": [
"default"
],
"define": {
"keymap": {
"\\": "set-input-mode-hiragana"
}
}
}
8 changes: 4 additions & 4 deletions dotfiles/config/libskk/rules/StickyShift/keymap/latin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"include": [
"default/latin",
"common"
]
"include": [
"default/latin",
"common"
]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"include": [
"default/wide-latin",
"common"
]
"include": [
"default/wide-latin",
"common"
]
}
4 changes: 2 additions & 2 deletions dotfiles/config/nvim/dpp_lazy.toml
Original file line number Diff line number Diff line change
Expand Up @@ -984,8 +984,8 @@ on_cmd = [
"GinEdit",
"GinLog",
"GinPatch",
"GinStatus"
]
"GinStatus",
]

[[plugins]]
repo = 'vim-denops/denops-shared-server.vim'
Expand Down
59 changes: 29 additions & 30 deletions dotfiles/config/nvim/init.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
if vim.loader then vim.loader.enable() end
if vim.loader then
vim.loader.enable()
end

-- start prelude
local dpp_src = "$HOME/.cache/dpp/repos/github.com/Shougo/dpp.vim"
Expand Down Expand Up @@ -28,13 +30,13 @@ vim.opt.runtimepath:prepend(denops_src)
-- call dpp#min#load_state("~/.cache/dpp")
-- call dpp#make_state("~/.cache/dpp", "~/.config/nvim/dpp.ts")
if dpp.load_state(dppBase) then
vim.api.nvim_create_autocmd("User", {
pattern = "DenopsReady",
callback = function()
vim.notify("dpp load_state() is failed")
dpp.make_state(dppBase, dpp_config)
end,
})
vim.api.nvim_create_autocmd("User", {
pattern = "DenopsReady",
callback = function()
vim.notify("dpp load_state() is failed")
dpp.make_state(dppBase, dpp_config)
end,
})
end

-- vim.api.nvim_create_autocmd("User", {
Expand All @@ -46,42 +48,40 @@ end

-- autocmd BufRead *.rs let g:rustfmt_autosave = 0
vim.api.nvim_create_autocmd("BufRead", {
pattern = "*.ab",
command = 'set filetype=amber'
pattern = "*.ab",
command = "set filetype=amber",
})


vim.cmd("filetype indent plugin on")
vim.cmd("syntax on")

vim.api.nvim_create_user_command("DppInstall", "call dpp#async_ext_action('installer', 'install')", { nargs = 0 })
vim.api.nvim_create_user_command("DppUpdate", "call dpp#async_ext_action('installer', 'update')", { nargs = 0 })
vim.api.nvim_create_user_command("DppMakestate", function(val)
dpp.make_state(dppBase, dpp_config)
dpp.make_state(dppBase, dpp_config)
end, { nargs = 0 })

vim.api.nvim_create_user_command("Ddu", function(args)
local subcmd = args.args
print(subcmd)
vim.fn["ddu#start"]({ sources = { { name = subcmd } } })
local subcmd = args.args
print(subcmd)
vim.fn["ddu#start"]({ sources = { { name = subcmd } } })
end, { nargs = 1 })


vim.api.nvim_create_user_command("Deol", function (args)
vim.fn["deol#new"]({command = "fish"})
vim.api.nvim_create_user_command("Deol", function(args)
vim.fn["deol#new"]({ command = "fish" })
end, {})

vim.api.nvim_create_autocmd({ "BufRead", "CursorHold", "InsertEnter" }, {
callback = function()
vim.opt.clipboard = "unnamedplus"
require("configs/keymap")
-- require("configs/cmd")

-- vim.cmd("colorscheme gruvbox")
-- vim.cmd("colorscheme wal")
-- vim.cmd("colorscheme nord")
vim.cmd("SeiyaEnable")
end,
callback = function()
vim.opt.clipboard = "unnamedplus"
require("configs/keymap")
-- require("configs/cmd")

-- vim.cmd("colorscheme gruvbox")
-- vim.cmd("colorscheme wal")
-- vim.cmd("colorscheme nord")
vim.cmd("SeiyaEnable")
end,
})

vim.cmd("colorscheme catppuccin-mocha")
Expand All @@ -108,7 +108,7 @@ vim.opt.relativenumber = true
vim.cmd("set completeopt=menuone,noinsert")

vim.keymap.set("n", "<leader>k", function()
print("Hop!")
print("Hop!")
end)

vim.cmd([[const mapleader = " "]])
Expand Down Expand Up @@ -139,5 +139,4 @@ vim.cmd([[let maplocalleader = ' ']])
-- vim.opt.runtimepath:append(vim.fn.expand("~/.ghq/github.com/Comamoca/sandbox/ex_gleam_denops"))
-- vim.opt.runtimepath:append(vim.fn.expand("~/.ghq/github.com/coma/vim-spotify"))


-- vim.g['denops_server_addr'] = "127.0.0.1:32123"
6 changes: 3 additions & 3 deletions dotfiles/config/nvim/lua/configs/cmd.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vim.api.nvim_create_user_command("DdcToml", "", {})
-- vim.api.nvim_create_user_command("DduToml", "e $MYVIMRC", {})

vim.api.nvim_create_user_command("Ddu", function(args)
local subcmd = args.args
print(subcmd)
vim.fn["ddu#start"]({ sources = { { name = subcmd } } })
local subcmd = args.args
print(subcmd)
vim.fn["ddu#start"]({ sources = { { name = subcmd } } })
end, { nargs = 1 })
11 changes: 5 additions & 6 deletions dotfiles/config/nvim/lua/configs/ddc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ ddc_custom_patch_global("sourceParams", {
}),
enableResolveItem = true,
enableAdditionalTextEdit = true,
sorters = {'sorter_lsp-kind'},
kindLabels = { Class = 'c' }
sorters = { "sorter_lsp-kind" },
kindLabels = { Class = "c" },
},
})

Expand Down Expand Up @@ -110,7 +110,6 @@ vim.fn["ddc#enable"]()
-- \ '<TAB>' : ddc#map#manual_complete()
-- ]])


vim.api.nvim_create_autocmd("InsertEnter", {
callback = function(event)
vim.keymap.set({ "i", "s" }, "<Tab>", function()
Expand All @@ -137,11 +136,11 @@ vim.api.nvim_create_autocmd("InsertEnter", {
end, {})

vim.keymap.set("i", "<C-y>", function()
return '<Cmd>call pum#map#confirm()<CR>'
return "<Cmd>call pum#map#confirm()<CR>"
end, { expr = true, silent = true })

vim.keymap.set("i", "<CR>", function()
return pum_visible() and '<Cmd>call pum#map#confirm()<CR>' or '<CR>'
return pum_visible() and "<Cmd>call pum#map#confirm()<CR>" or "<CR>"
end, { expr = true, silent = true })
end
end,
})
Loading

0 comments on commit e229985

Please sign in to comment.