mirror of
https://github.com/danbee/dotfiles-local
synced 2025-03-04 08:49:07 +00:00
Compare commits
13 Commits
df8050683c
...
4949356449
| Author | SHA1 | Date | |
|---|---|---|---|
| 4949356449 | |||
|
|
832bd0e94e | ||
|
|
e96dec97ab | ||
|
|
7d536ba184 | ||
| 9fb4f8a6bb | |||
|
|
fb3b28b777 | ||
|
|
da69a9eba7 | ||
|
|
1d10668cd6 | ||
|
|
7e3a2cf5e9 | ||
|
|
d9a16ecf09 | ||
|
|
8ccc95f84e | ||
|
|
eb8d759915 | ||
| 60809d53f3 |
@ -1,28 +1,33 @@
|
||||
{
|
||||
"ascii.nvim": { "branch": "master", "commit": "068b098b6d301bb87988ea749b66bed641072121" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-cmdline": { "branch": "main", "commit": "8fcc934a52af96120fe26358985c10c035984b53" },
|
||||
"cmp-cmdline": { "branch": "main", "commit": "5af1bb7d722ef8a96658f01d6eb219c4cf746b32" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp-vsnip": { "branch": "main", "commit": "989a8a73c44e926199bfd05fa7a516d51f2d2752" },
|
||||
"gruvbox.nvim": { "branch": "main", "commit": "53bfb95b1ed1d87f6a276abdd322b267be0b5adf" },
|
||||
"kanagawa.nvim": { "branch": "master", "commit": "5c4037432f0ae2d0b75d3a7b7cfa3022d7054e4d" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "57cce98dfdb2f2dd05a0567d89811e6d0505e13b" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "c28a7427c3fb29322db136f0564ec58807b26747" },
|
||||
"mason.nvim": { "branch": "main", "commit": "b54d4e3171cc9735de915dbb97e987fb1f05dad9" },
|
||||
"neo-tree.nvim": { "branch": "v2.x", "commit": "2b2f74828eeb02cf29d6b21aa32eedadadc94ca7" },
|
||||
"nordic.nvim": { "branch": "main", "commit": "fc7ea160bb441f9c0245c2719a3c7b8c22468178" },
|
||||
"nui.nvim": { "branch": "main", "commit": "1f43b13d133eb4b4f53a4485379d9afa58808389" },
|
||||
"null-ls.nvim": { "branch": "main", "commit": "5855128178fa78293acdfb5b4e41ef046779240b" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "777450fd0ae289463a14481673e26246b5e38bf2" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "7d5af779acbc8a6ff9dfd7f2d39ae898fb67480f" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "c85d059c462ae7de0aa2a6ed0589f0b223e0e6a9" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "b55fe6175f0001347a433c9df358c8cbf8a4e90f" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "0568104bf8d0c3ab16395433fcc5c1638efc25d4" },
|
||||
"onedark.nvim": { "branch": "master", "commit": "dd640f6cfb0e370cfd3db389f04b172508848bd3" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "253d34830709d690f013daf2853a9d21ad7accab" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "942fe5faef47b21241e970551eba407bc10d9547" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "1b0c88094548a62641ece1e668fa9a234e1c539e" },
|
||||
"vim-startify": { "branch": "master", "commit": "81e36c352a8deea54df5ec1e2f4348685569bed2" },
|
||||
"dashboard-nvim": { "branch": "master", "commit": "be2420c29fd4b96d095b631c5a9cbd7fd4bd5aa3" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "e5edefd9976039f5352e0c900f35206770b33a2d" },
|
||||
"gruvbox.nvim": { "branch": "main", "commit": "df149bccb19a02c5c2b9fa6ec0716f0c0487feb0" },
|
||||
"kanagawa.nvim": { "branch": "master", "commit": "12f07c5d68ba6b09b53ab528de6df68e55b4cd9a" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "ceb413678dfcf3d5455208959185e3db1f7892c7" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "84ffb80e452d95e2c46fa29a98ea11a240f7843e" },
|
||||
"mason.nvim": { "branch": "main", "commit": "057ac5ca159c83e302a55bd839a96ff1ea2396db" },
|
||||
"neo-tree.nvim": { "branch": "v2.x", "commit": "8d485aab32da9b8841d4af977f992b82b14af469" },
|
||||
"nerdcommenter": { "branch": "master", "commit": "1fe9e1cfea9bb0dbc77174d776759ed67899ee50" },
|
||||
"nordic.nvim": { "branch": "main", "commit": "bd4cf4e4ca8b6a8b63e2e6e38d2112a59be45494" },
|
||||
"nui.nvim": { "branch": "main", "commit": "698e75814cd7c56b0dd8af4936bcef2d13807f3c" },
|
||||
"null-ls.nvim": { "branch": "main", "commit": "33b853a3933eed3137cd055aac4e539e69832ad0" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "c3f7c54f6efed83b5657b1cf2e2a9bb7c121c6b4" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "05689b96fdad33fb01d4968089760d6886a65058" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "e2cf8977fda35ad666d7b431b0254d8da710968a" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "85a6f9d1af8b731f09f4031e1f9478d4b40d13ab" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "0bf8fbc2ca8f8cdb6efbd0a9e32740d7a991e4c3" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "b34362b20a4942b3245f958e73ebe1b09b020ad1" },
|
||||
"onedark.nvim": { "branch": "master", "commit": "82cad746101300aa2fdea5f4d121c51c23bab8bd" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "9ac3e9541bbabd9d73663d757e4fe48a675bb054" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "713d26b98583b160b50fb827adb751f768238ed3" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "c5df636ce62a8aab7565f35da143cfd672526302" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "5f0d280b517cacb16f59316659966c7ca5e2bea2" },
|
||||
"vim-vsnip": { "branch": "master", "commit": "7753ba9c10429c29d25abfd11b4c60b76718c438" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "4b73390eec680b4c061ea175eb32c0ff3412271d" }
|
||||
"which-key.nvim": { "branch": "main", "commit": "4acffc92953a90a790603bfdab7c92319ab167b1" }
|
||||
}
|
||||
@ -19,4 +19,7 @@ keymap("n", "<C-s>", ":Telescope live_grep<CR>")
|
||||
keymap("n", "<C-b>", ":Telescope buffers<CR>")
|
||||
|
||||
-- Formatting
|
||||
keymap("n", "<leader>f", ":lua vim.lsp.buf.format()<CR>")
|
||||
keymap("n", "<leader>f", vim.lsp.buf.format, { desc = "Format buffer" })
|
||||
|
||||
-- LSP
|
||||
require("config.keymaps.lsp")
|
||||
|
||||
48
config/nvim/lua/config/keymaps/lsp.lua
Normal file
48
config/nvim/lua/config/keymaps/lsp.lua
Normal file
@ -0,0 +1,48 @@
|
||||
local keymap = vim.keymap.set
|
||||
|
||||
keymap(
|
||||
"n",
|
||||
"<leader>e",
|
||||
vim.diagnostic.open_float,
|
||||
{ desc = "Show LSP diagnostic" }
|
||||
)
|
||||
keymap("n", "[d", vim.diagnostic.goto_prev)
|
||||
keymap("n", "]d", vim.diagnostic.goto_next)
|
||||
keymap(
|
||||
"n",
|
||||
"<leader>q",
|
||||
vim.diagnostic.setloclist,
|
||||
{ desc = "Show all LSP errors" }
|
||||
)
|
||||
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
|
||||
callback = function(ev)
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
vim.bo[ev.buf].omnifunc = "v:lua.vim.lsp.omnifunc"
|
||||
|
||||
-- Buffer local mappings.
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||
local opts = { buffer = ev.buf }
|
||||
|
||||
vim.keymap.set("n", "gD", vim.lsp.buf.declaration, opts)
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, opts)
|
||||
vim.keymap.set("n", "gi", vim.lsp.buf.implementation, opts)
|
||||
vim.keymap.set("n", "<leader>wa", vim.lsp.buf.add_workspace_folder, opts)
|
||||
vim.keymap.set("n", "<leader>wr", vim.lsp.buf.remove_workspace_folder, opts)
|
||||
|
||||
vim.keymap.set("n", "<leader>wl", function()
|
||||
print(vim.inspect(vim.lsp.buf.list_workleader_folders()))
|
||||
end, opts)
|
||||
|
||||
vim.keymap.set("n", "<leader>D", vim.lsp.buf.type_definition, opts)
|
||||
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts)
|
||||
vim.keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, opts)
|
||||
vim.keymap.set("n", "gr", vim.lsp.buf.references, opts)
|
||||
|
||||
vim.keymap.set("n", "<leader>f", function()
|
||||
vim.lsp.buf.format({ async = true })
|
||||
end, opts)
|
||||
end,
|
||||
})
|
||||
@ -2,6 +2,11 @@ require("onedark").load()
|
||||
|
||||
local indent = 2
|
||||
|
||||
vim.opt.updatetime = 100
|
||||
|
||||
-- Local project config
|
||||
vim.opt.exrc = true
|
||||
|
||||
-- Tabstops
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.shiftwidth = indent
|
||||
@ -10,3 +15,22 @@ vim.opt.tabstop = indent
|
||||
|
||||
-- Line numbers
|
||||
vim.opt.number = true
|
||||
|
||||
-- Line width
|
||||
local colorcolumns = {}
|
||||
for i = 1, 40 do
|
||||
table.insert(colorcolumns, string.format("+%i", i))
|
||||
end
|
||||
|
||||
vim.opt.textwidth = 80
|
||||
vim.opt.colorcolumn = table.concat(colorcolumns, ",")
|
||||
|
||||
-- Open new split panes to the right and bottom, which feels more natural
|
||||
vim.opt.splitbelow = true
|
||||
vim.opt.splitright = true
|
||||
|
||||
-- Neovide
|
||||
if vim.g.neovide then
|
||||
vim.g.neovide_cursor_animation_length = 0
|
||||
vim.g.neovide_background_color = "#20252c"
|
||||
end
|
||||
|
||||
15
config/nvim/lua/config/plugins/dashboard.lua
Normal file
15
config/nvim/lua/config/plugins/dashboard.lua
Normal file
@ -0,0 +1,15 @@
|
||||
return function()
|
||||
require("dashboard").setup({
|
||||
theme = "hyper",
|
||||
config = {
|
||||
header = {
|
||||
[[ ███╗ ██╗ ███████╗ ██████╗ ██╗ ██╗ ██╗ ███╗ ███╗]],
|
||||
[[ ████╗ ██║ ██╔════╝██╔═══██╗ ██║ ██║ ██║ ████╗ ████║]],
|
||||
[[ ██╔██╗ ██║ █████╗ ██║ ██║ ██║ ██║ ██║ ██╔████╔██║]],
|
||||
[[ ██║╚██╗██║ ██╔══╝ ██║ ██║ ╚██╗ ██╔╝ ██║ ██║╚██╔╝██║]],
|
||||
[[ ██║ ╚████║ ███████╗╚██████╔╝ ╚████╔╝ ██║ ██║ ╚═╝ ██║]],
|
||||
[[ ╚═╝ ╚═══╝ ╚══════╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝]],
|
||||
}
|
||||
}
|
||||
})
|
||||
end
|
||||
@ -4,4 +4,5 @@ return function()
|
||||
require("config.plugins.lspconfig.javascript")
|
||||
require("config.plugins.lspconfig.lua")
|
||||
require("config.plugins.lspconfig.ruby")
|
||||
require("config.plugins.lspconfig.rust")
|
||||
end
|
||||
|
||||
1
config/nvim/lua/config/plugins/lspconfig/rust.lua
Normal file
1
config/nvim/lua/config/plugins/lspconfig/rust.lua
Normal file
@ -0,0 +1 @@
|
||||
require("lspconfig").rust_analyzer.setup({})
|
||||
2
config/nvim/lua/config/plugins/nerdcommenter.lua
Normal file
2
config/nvim/lua/config/plugins/nerdcommenter.lua
Normal file
@ -0,0 +1,2 @@
|
||||
-- Add a space after comment characters
|
||||
vim.g.NERDSpaceDelims = 1
|
||||
@ -4,8 +4,27 @@ return function()
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
null_ls.builtins.formatting.crystal_format,
|
||||
null_ls.builtins.formatting.eslint,
|
||||
null_ls.builtins.formatting.prettier,
|
||||
null_ls.builtins.formatting.prettierd.with({
|
||||
filetypes = {
|
||||
"css",
|
||||
"graphql",
|
||||
"handlebars",
|
||||
"html",
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"json",
|
||||
"jsonc",
|
||||
"less",
|
||||
"markdown",
|
||||
"markdown.mdx",
|
||||
"ruby",
|
||||
"scss",
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
"vue",
|
||||
"yaml",
|
||||
},
|
||||
}),
|
||||
null_ls.builtins.formatting.rustfmt,
|
||||
null_ls.builtins.formatting.standardrb,
|
||||
null_ls.builtins.formatting.stylua,
|
||||
|
||||
@ -1,36 +1,39 @@
|
||||
return {
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
context_commentstring = { enable = true, enable_autocmd = false },
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"c",
|
||||
"css",
|
||||
"dockerfile",
|
||||
"eex",
|
||||
"elixir",
|
||||
"help",
|
||||
"html",
|
||||
"javascript",
|
||||
"json",
|
||||
"lua",
|
||||
"luadoc",
|
||||
"luap",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"python",
|
||||
"query",
|
||||
"regex",
|
||||
"ruby",
|
||||
"rust",
|
||||
"scss",
|
||||
"sql",
|
||||
"swift",
|
||||
"toml",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"vue",
|
||||
"yaml",
|
||||
},
|
||||
}
|
||||
return function()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
context_commentstring = { enable = true },
|
||||
auto_install = true,
|
||||
sync_install = false,
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"c",
|
||||
"css",
|
||||
"dockerfile",
|
||||
"eex",
|
||||
"elixir",
|
||||
"html",
|
||||
"javascript",
|
||||
"json",
|
||||
"lua",
|
||||
"luadoc",
|
||||
"luap",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"python",
|
||||
"query",
|
||||
"regex",
|
||||
"ruby",
|
||||
"rust",
|
||||
"scss",
|
||||
"sql",
|
||||
"swift",
|
||||
"toml",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"vue",
|
||||
"yaml",
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
@ -5,7 +5,26 @@ return {
|
||||
"hrsh7th/cmp-cmdline",
|
||||
"hrsh7th/cmp-vsnip",
|
||||
"hrsh7th/vim-vsnip",
|
||||
"mhinz/vim-startify",
|
||||
"tpope/vim-fugitive",
|
||||
"preservim/nerdcommenter",
|
||||
{
|
||||
"MaximilianLloyd/ascii.nvim",
|
||||
dependencies = {
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
},
|
||||
{
|
||||
"glepnir/dashboard-nvim",
|
||||
event = "VimEnter",
|
||||
config = require("config.plugins.dashboard"),
|
||||
dependencies = { { "nvim-tree/nvim-web-devicons" } },
|
||||
},
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
config = function()
|
||||
require("gitsigns").setup()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
config = require("config.plugins.nvim-cmp"),
|
||||
|
||||
@ -1,18 +1,15 @@
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
|
||||
build = ":TSUpdate",
|
||||
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
|
||||
dependencies = {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
init = function()
|
||||
-- PERF: no need to load the plugin, if we only need its queries for mini.ai
|
||||
local plugin =
|
||||
require("lazy.core.config").spec.plugins["nvim-treesitter"]
|
||||
require("lazy.core.config").spec.plugins["nvim-treesitter"]
|
||||
local opts = require("lazy.core.plugin").values(plugin, "opts", false)
|
||||
local enabled = false
|
||||
if opts.textobjects then
|
||||
@ -30,9 +27,8 @@ return {
|
||||
end
|
||||
end,
|
||||
},
|
||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
},
|
||||
|
||||
---@type TSConfig
|
||||
opts = require("config.plugins.tree-sitter"),
|
||||
config = require("config.plugins.tree-sitter"),
|
||||
},
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user