-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c591c08
commit 5f65b15
Showing
37 changed files
with
589 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ bin | |
*TODO* | ||
*todo* | ||
secrets | ||
*/**lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ | |
~/.ideavimrc: vim/ideavimrc | ||
~/bin: bin | ||
~/.icons: desktop/icons | ||
~/.config/nvim: nvim | ||
|
||
|
||
- create: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
vim.g.mapleader = " " | ||
|
||
-- Setup package manager | ||
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" | ||
if not vim.loop.fs_stat(lazypath) then | ||
local repo = "https://github.com/folke/lazy.nvim.git" | ||
vim.fn.system { | ||
"git", | ||
"clone", | ||
"--filter=blob:none", | ||
repo, | ||
"--branch=stable", | ||
lazypath, | ||
} | ||
end | ||
vim.opt.rtp:prepend(lazypath) | ||
|
||
require "options" | ||
|
||
require("lazy").setup("plugins", require "lazy") | ||
|
||
vim.schedule(function() | ||
vim.filetype.add(require "filetypes") | ||
require "mappings" | ||
end) | ||
|
||
-- vim.cmd.colorscheme "catppuccin" | ||
|
||
-- Add the mason binary path to the PATH variable, so that plugins, such as | ||
-- conform, can use the mason binaries. | ||
local function configure_mason_path() | ||
local is_windows = vim.fn.has "win32" ~= 0 | ||
local sep = is_windows and "\\" or "/" | ||
local delim = is_windows and ";" or ":" | ||
vim.env.PATH = table.concat({ vim.fn.stdpath "data", "mason", "bin" }, sep) | ||
.. delim | ||
.. vim.env.PATH | ||
end | ||
configure_mason_path() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
return { | ||
extension = { | ||
ebnf = "ebnf", | ||
mdx = "markdown", | ||
}, | ||
|
||
filename = { | ||
justfile = "just", | ||
}, | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
return { | ||
defaults = { lazy = true }, | ||
-- install = { colorscheme = { "catppuccin" } }, | ||
|
||
ui = { | ||
icons = { | ||
ft = "", | ||
lazy = " ", | ||
loaded = "", | ||
not_loaded = "", | ||
}, | ||
}, | ||
|
||
performance = { | ||
rtp = { | ||
disabled_plugins = { | ||
"2html_plugin", | ||
"tohtml", | ||
"getscript", | ||
"getscriptPlugin", | ||
"gzip", | ||
"logipat", | ||
"netrw", | ||
"netrwPlugin", | ||
"netrwSettings", | ||
"netrwFileHandlers", | ||
"matchit", | ||
"tar", | ||
"tarPlugin", | ||
"rrhelper", | ||
"spellfile_plugin", | ||
"vimball", | ||
"vimballPlugin", | ||
"zip", | ||
"zipPlugin", | ||
"tutor", | ||
-- "rplugin", | ||
"syntax", | ||
"synmenu", | ||
"optwin", | ||
"compiler", | ||
"bugreport", | ||
"ftplugin", | ||
}, | ||
}, | ||
}, | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
return {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
return {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
return {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
return { | ||
cmd = { | ||
vim.fn.stdpath "data" .. "/mason/packages/elixir-ls/language_server.sh", | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
return {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
return {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
return { | ||
settings = { | ||
gopls = { | ||
completeUnimported = true, | ||
usePlaceholders = true, | ||
analyses = { | ||
unusedparams = true, | ||
}, | ||
}, | ||
env = { | ||
GOEXPERIMENT = "rangefunc", | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
return {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
return {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
return { | ||
cmd = { "jdtls" }, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
return {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
local rtp = vim.api.nvim_list_runtime_paths() | ||
local library_paths = { | ||
vim.fn.expand "$VIMRUNTIME/lua", | ||
vim.fn.expand "$VIMRUNTIME/lua/vim/lsp", | ||
} | ||
for _, path in ipairs(rtp) do | ||
local lua_path = path .. "/lua" | ||
if vim.fn.isdirectory(lua_path) == 1 then | ||
table.insert(library_paths, lua_path) | ||
end | ||
end | ||
|
||
return { | ||
settings = { | ||
Lua = { | ||
diagnostics = { | ||
globals = { "vim" }, | ||
}, | ||
workspace = { | ||
library = library_paths, | ||
maxPreload = 100000, | ||
preloadFileSize = 10000, | ||
}, | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
return {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
return {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
return { | ||
settings = { | ||
python = { | ||
analysis = { | ||
autoSearchPaths = true, | ||
typeCheckingMode = "basic", | ||
}, | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
return { | ||
settings = { | ||
["rust-analyzer"] = { | ||
check = { | ||
command = "clippy", | ||
}, | ||
diagnostics = { | ||
enable = true, | ||
}, | ||
cargo = { | ||
buildScripts = { | ||
enable = true, | ||
}, | ||
}, | ||
}, | ||
}, | ||
on_attach = function(_, bufnr) | ||
vim.lsp.inlay_hint.enable(true, { bufnr = bufnr }) | ||
end, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
return {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
return { | ||
init_options = { | ||
preferences = { | ||
importModuleSpecifierPreference = "non-relative", | ||
}, | ||
}, | ||
|
||
on_attach = function(client, bufnr) | ||
require("twoslash-queries").attach(client, bufnr) | ||
end, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
return {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
local map = vim.keymap.set | ||
|
||
-- ==================================================================== | ||
-- lsp | ||
-- ==================================================================== | ||
|
||
map("n", "gD", vim.lsp.buf.declaration, { silent = true }) | ||
map("n", "gd", vim.lsp.buf.definition, { silent = true }) | ||
map("n", "gi", vim.lsp.buf.implementation, { silent = true }) | ||
map("n", "gs", vim.lsp.buf.signature_help, { silent = true }) | ||
-- TODO see :help vim.lsp.buf<Tab> | ||
|
||
-- ==================================================================== | ||
-- diagnostic | ||
-- ==================================================================== | ||
|
||
map("n", "[d", vim.diagnostic.goto_prev, { silent = true }) | ||
map("n", "]d", vim.diagnostic.goto_next, { silent = true }) | ||
map("n", "gef", vim.diagnostic.open_float, { silent = true }) | ||
map("n", "geq", vim.diagnostic.setqflist, { silent = true }) | ||
|
||
-- ==================================================================== | ||
-- oil | ||
-- ==================================================================== | ||
|
||
map("n", "-", "<CMD>Oil<CR>", { silent = true }) | ||
|
||
-- ==================================================================== | ||
-- telescope | ||
-- ==================================================================== | ||
|
||
map("n", "<leader>ff", ":Telescope find_files<CR>", { silent = true }) | ||
map("n", "<leader>fw", ":Telescope live_grep<CR>", { silent = true }) | ||
map("n", "<leader>fb", ":Telescope buffers<CR>", { silent = true }) | ||
map("n", "gi", ":Telescope lsp_implementations<CR>", { silent = true }) | ||
map("n", "gd", ":Telescope lsp_definitions<CR>", { silent = true }) | ||
map("n", "gr", ":Telescope lsp_references<CR>", { silent = true }) | ||
map("n", "gl", ":Telescope diagnostics<CR>", { silent = true }) | ||
|
||
-- https://github.com/lukasl-dev/nixos/blob/master/dots/nvim/lua/mappings.lua | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
local o = vim.opt | ||
|
||
o.colorcolumn = "80" | ||
o.showmode = false | ||
|
||
o.number = true | ||
o.relativenumber = true | ||
o.numberwidth = 2 | ||
o.ruler = false | ||
|
||
o.expandtab = true | ||
o.shiftwidth = 2 | ||
o.smartindent = true | ||
o.tabstop = 2 | ||
o.softtabstop = 2 | ||
|
||
o.signcolumn = "yes" | ||
o.splitbelow = true | ||
o.splitright = true | ||
o.timeoutlen = 400 | ||
o.undofile = true | ||
|
||
o.clipboard = "unnamedplus" | ||
o.cursorline = true | ||
o.cursorlineopt = "number" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
return { | ||
{ | ||
"hrsh7th/nvim-cmp", | ||
|
||
---@module "cmp" | ||
---@return cmp.ConfigSchema | ||
opts = function() | ||
local cmp = require "cmp" | ||
|
||
return { | ||
snippet = { | ||
expand = function(args) | ||
require("luasnip").lsp_expand(args.body) | ||
end, | ||
}, | ||
preselect = cmp.PreselectMode.Item, | ||
window = { | ||
completion = { | ||
scrollbar = false, | ||
border = "rounded", | ||
winhighlight = "Normal:CmpNormal", | ||
}, | ||
}, | ||
mapping = { | ||
["<C-p>"] = cmp.mapping.select_prev_item(), | ||
["<C-n>"] = cmp.mapping.select_next_item(), | ||
["<C-d>"] = cmp.mapping.scroll_docs(-4), | ||
["<C-f>"] = cmp.mapping.scroll_docs(4), | ||
["<C-Space>"] = cmp.mapping.complete(), | ||
["<C-e>"] = cmp.mapping.close(), | ||
["<CR>"] = cmp.mapping.confirm { | ||
behavior = cmp.ConfirmBehavior.Insert, | ||
select = true, | ||
}, | ||
["<Tab>"] = cmp.mapping(function(fallback) | ||
if cmp.visible() then | ||
cmp.select_next_item() | ||
elseif require("luasnip").expand_or_jumpable() then | ||
require("luasnip").expand_or_jump() | ||
else | ||
fallback() | ||
end | ||
end, { "i", "s" }), | ||
["<S-Tab>"] = cmp.mapping(function(fallback) | ||
if cmp.visible() then | ||
cmp.select_prev_item() | ||
elseif require("luasnip").jumpable(-1) then | ||
require("luasnip").jump(-1) | ||
else | ||
fallback() | ||
end | ||
end, { "i", "s" }), | ||
}, | ||
sources = { | ||
{ name = "nvim_lsp" }, | ||
{ name = "luasnip" }, | ||
{ name = "buffer" }, | ||
{ name = "nvim_lua" }, | ||
{ name = "path" }, | ||
}, | ||
} | ||
end, | ||
}, | ||
|
||
{ | ||
"saadparwaiz1/cmp_luasnip", | ||
"hrsh7th/cmp-nvim-lua", | ||
"hrsh7th/cmp-nvim-lsp", | ||
"hrsh7th/cmp-buffer", | ||
"hrsh7th/cmp-path", | ||
}, | ||
} | ||
|
Oops, something went wrong.