Compare commits
10 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e30125dfaf | |||
| f10466e063 | |||
|
|
3bf0f1e8e6 | ||
| 9c3e8ec512 | |||
| 562b8065ec | |||
| 00c18da4fb | |||
| e5ed78d82d | |||
| 81a7e5a123 | |||
| 11b1a80529 | |||
| 8512b8294c |
20 changed files with 567 additions and 195 deletions
235
init.lua
235
init.lua
|
|
@ -4,224 +4,73 @@ vim.g.maplocalleader = " "
|
|||
|
||||
vim.o.number = true
|
||||
vim.o.relativenumber = true
|
||||
vim.o.wrap = true
|
||||
vim.o.linebreak = true
|
||||
|
||||
vim.o.ignorecase = true
|
||||
vim.o.smartcase = true
|
||||
vim.o.inccommand = 'split'
|
||||
|
||||
vim.o.cursorline = true
|
||||
vim.o.showmode = true
|
||||
vim.o.hlsearch = false
|
||||
vim.o.wrap = true
|
||||
vim.o.tabstop = 4
|
||||
vim.o.tabstop = 2
|
||||
vim.o.shiftwidth = 2
|
||||
vim.g.have_nerd_font = true
|
||||
vim.o.scrolloff = 10
|
||||
vim.g.border = "rounded"
|
||||
vim.o.termguicolors = true
|
||||
vim.o.cursorline = true
|
||||
|
||||
vim.o.swapfile = false
|
||||
vim.o.mouse = 'a'
|
||||
vim.o.mouse = "a"
|
||||
vim.o.undofile = true
|
||||
vim.o.spell = false
|
||||
|
||||
-- diagnostic config
|
||||
vim.diagnostic.config({
|
||||
virtual_text = false,
|
||||
float = { source = 'always', border = 'rounded' }
|
||||
virtual_text = false,
|
||||
float = { source = "always", border = "rounded" },
|
||||
})
|
||||
|
||||
-- Highlight On Yank
|
||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||
desc = 'Highlight when yanking (copying) text',
|
||||
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
|
||||
callback = function()
|
||||
vim.hl.on_yank()
|
||||
end,
|
||||
})
|
||||
require("config.keymaps")
|
||||
require("config.autocmds")
|
||||
require("config.plugins.autosave")
|
||||
require("config.plugins.barbar")
|
||||
require("config.plugins.blink")
|
||||
require("config.plugins.dashboard")
|
||||
require("config.plugins.lualine")
|
||||
require("config.plugins.mason")
|
||||
require("config.plugins.mini")
|
||||
require("config.plugins.nvim-lspconfig")
|
||||
require("config.plugins.nvim-tree")
|
||||
require("config.plugins.prettier")
|
||||
require("config.plugins.telescope")
|
||||
require("config.plugins.theme")
|
||||
require("config.plugins.treesitter")
|
||||
require("config.plugins.venv-selector")
|
||||
require("config.plugins.markdown-renderer")
|
||||
|
||||
-- unset space so it can be used as leader
|
||||
vim.keymap.set("n", " ", "", { silent = true, remap = false })
|
||||
|
||||
-- move around windows
|
||||
vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'focus to l window' })
|
||||
vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'focus to r window' })
|
||||
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'focus to dwn window' })
|
||||
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'focus to up window' })
|
||||
|
||||
-- move lines up and down
|
||||
vim.keymap.set("n", "<A-j>", ":m .+1<CR>==")
|
||||
vim.keymap.set("n", "<A-k>", ":m .-2<CR>==")
|
||||
vim.keymap.set("v", "<A-j>", ":m '>+1<CR>gv=gv")
|
||||
vim.keymap.set("v", "<A-k>", ":m '<-2<CR>gv=gv")
|
||||
|
||||
-- toggle nvim tree
|
||||
vim.keymap.set("n", "<leader>e", ":NvimTreeToggle<CR>")
|
||||
|
||||
-- barbar
|
||||
vim.keymap.set("n", "<leader>x", ":BufferClose<CR>")
|
||||
-- (I need both options, one for windows, one for linux)
|
||||
vim.keymap.set("n", "<A-h>", ":BufferPrevious<CR>")
|
||||
vim.keymap.set("n", "<A-l>", ":BufferNext<CR>")
|
||||
vim.keymap.set("n", "<A-,>", "<Cmd>BufferPrevious<CR>")
|
||||
vim.keymap.set("n", "<A-.>", "<Cmd>BufferNext<CR>")
|
||||
|
||||
-- diagnostics
|
||||
vim.keymap.set("n", "<leader>ds", ":lua vim.diagnostic.open_float()<CR>")
|
||||
vim.keymap.set("n", "<leader>dn", function() vim.diagnostic.jump({ count = 1 }) end)
|
||||
vim.keymap.set("n", "<leader>dp", function() vim.diagnostic.jump({ count = -1 }) end)
|
||||
|
||||
-- VIM PACKS
|
||||
vim.pack.add({
|
||||
-- theme
|
||||
{ src = "https://github.com/neanias/everforest-nvim.git" },
|
||||
|
||||
-- lsp
|
||||
{ src = 'https://github.com/neovim/nvim-lspconfig' },
|
||||
{ src = 'https://github.com/mason-org/mason.nvim' },
|
||||
{ src = 'https://github.com/mason-org/mason-lspconfig.nvim' },
|
||||
{ src = 'https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim' },
|
||||
|
||||
-- treesitter
|
||||
{ src = 'https://github.com/nvim-treesitter/nvim-treesitter', branch = "main", build = ":TSUpdate", lazy = false},
|
||||
|
||||
-- bar and icons at the top
|
||||
{ src = 'https://github.com/nvim-tree/nvim-web-devicons' },
|
||||
{ src = 'https://github.com/romgrk/barbar.nvim' },
|
||||
|
||||
-- file tree
|
||||
{ src = 'https://github.com/nvim-tree/nvim-tree.lua' },
|
||||
|
||||
-- auto save
|
||||
{ src = 'https://github.com/Pocco81/auto-save.nvim' },
|
||||
|
||||
-- completion
|
||||
{ src = 'https://github.com/saghen/blink.cmp' },
|
||||
|
||||
-- lualine
|
||||
{ src = 'https://github.com/nvim-lualine/lualine.nvim' },
|
||||
|
||||
-- surround
|
||||
{ src = 'https://github.com/echasnovski/nvim-mini/mini.nvim' },
|
||||
|
||||
-- telescope
|
||||
{ src = 'https://github.com/nvim-lua/plenary.nvim' },
|
||||
{ src = 'https://github.com/nvim-telescope/telescope.nvim' },
|
||||
})
|
||||
|
||||
-- telescope (sadly these configs need to be after vimpack)
|
||||
local builtin = require('telescope.builtin')
|
||||
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' })
|
||||
vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = 'Telescope live grep' })
|
||||
vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' })
|
||||
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' })
|
||||
|
||||
require('nvim-treesitter.configs').setup {
|
||||
ensure_installed = {},
|
||||
modules = {},
|
||||
sync_install = false,
|
||||
auto_install = true,
|
||||
ignore_install = {},
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
local enable_providers = {
|
||||
"python3_provider",
|
||||
}
|
||||
|
||||
vim.cmd("colorscheme everforest")
|
||||
for _, plugin in pairs(enable_providers) do
|
||||
vim.g["loaded_" .. plugin] = nil
|
||||
vim.cmd("runtime " .. plugin)
|
||||
end
|
||||
|
||||
require "barbar".setup()
|
||||
require "mini.ai".setup()
|
||||
require "mini.surround".setup()
|
||||
require "mini.pairs".setup()
|
||||
require "nvim-tree".setup()
|
||||
require "auto-save".setup()
|
||||
require "blink.cmp".setup({
|
||||
keymap = {
|
||||
preset = "enter",
|
||||
["<CR>"] = { "select_and_accept", "fallback" },
|
||||
},
|
||||
})
|
||||
vim.g.loaded_python3_provider = nil
|
||||
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'everforest',
|
||||
component_separators = { left = '', right = ''},
|
||||
section_separators = { left = '', right = ''},
|
||||
disabled_filetypes = {
|
||||
statusline = {},
|
||||
winbar = {},
|
||||
},
|
||||
ignore_focus = {},
|
||||
always_divide_middle = true,
|
||||
always_show_tabline = true,
|
||||
globalstatus = false,
|
||||
refresh = {
|
||||
statusline = 1000,
|
||||
tabline = 1000,
|
||||
winbar = 1000,
|
||||
refresh_time = 16, -- ~60fps
|
||||
events = {
|
||||
'WinEnter',
|
||||
'BufEnter',
|
||||
'BufWritePost',
|
||||
'SessionLoadPost',
|
||||
'FileChangedShellPost', 'VimResized', 'Filetype',
|
||||
'CursorMoved',
|
||||
'CursorMovedI',
|
||||
'ModeChanged',
|
||||
},
|
||||
}
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {'mode'},
|
||||
lualine_b = {'branch', 'diff', 'diagnostics'},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {'encoding', 'fileformat', 'filetype'},
|
||||
lualine_y = {'progress'},
|
||||
lualine_z = {'location'}
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {'location'},
|
||||
lualine_y = {},
|
||||
lualine_z = {}
|
||||
},
|
||||
tabline = {},
|
||||
winbar = {},
|
||||
inactive_winbar = {},
|
||||
extensions = {}
|
||||
}
|
||||
|
||||
require('mason').setup()
|
||||
require('mason-lspconfig').setup()
|
||||
require('mason-tool-installer').setup({
|
||||
ensure_installed = {
|
||||
"biome",
|
||||
"djlint",
|
||||
"emmet-language-server",
|
||||
"html-lsp",
|
||||
"lua-language-server",
|
||||
"lwc-language-server",
|
||||
"omnisharp",
|
||||
"prettier",
|
||||
"prettierd",
|
||||
"python-lsp-server",
|
||||
"roslyn",
|
||||
"ruff",
|
||||
"selene",
|
||||
"stylua",
|
||||
"typescript-language-server",
|
||||
}
|
||||
})
|
||||
|
||||
vim.lsp.config('lua_ls', {
|
||||
-- lua... I need to move this
|
||||
vim.lsp.config("lua_ls", {
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
version = 'LuaJIT',
|
||||
},
|
||||
version = "LuaJIT",
|
||||
diagnostics = {
|
||||
globals = {
|
||||
'vim',
|
||||
'require'
|
||||
"vim",
|
||||
"require",
|
||||
},
|
||||
},
|
||||
workspace = {
|
||||
|
|
|
|||
51
lsp/pylsp.lua
Normal file
51
lsp/pylsp.lua
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
vim.lsp.config("pylsp", {
|
||||
settings = {
|
||||
pylsp = {
|
||||
plugins = {
|
||||
pycodestyle = {
|
||||
ignore = { "W391", "E501" },
|
||||
maxLineLength = 100,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.lsp.config('basedpyright', {
|
||||
cmd = { 'basedpyright-langserver', '--stdio' },
|
||||
filetypes = { 'python' },
|
||||
root_markers = {
|
||||
'pyproject.toml',
|
||||
'setup.py',
|
||||
'setup.cfg',
|
||||
'requirements.txt',
|
||||
'Pipfile',
|
||||
'pyrightconfig.json',
|
||||
'.git',
|
||||
},
|
||||
settings = {
|
||||
basedpyright = {
|
||||
analysis = {
|
||||
|
||||
diagnosticSeverityOverrides = {
|
||||
reportAny = false,
|
||||
reportOptionalOperand = "warning",
|
||||
reportOptionalMemberAccess = false,
|
||||
reportOptionalSubscript = false,
|
||||
reportAttributeAccessIssue = false,
|
||||
reportMissingTypeArgument = false,
|
||||
reportMissingTypeStubs = false,
|
||||
reportUnknownArgumentType = false,
|
||||
reportUnknownMemberType = false,
|
||||
reportUnknownParameterType = false,
|
||||
reportUnknownVariableType = false,
|
||||
reportUnusedCallResult = false,
|
||||
},
|
||||
autoSearchPaths = true,
|
||||
useLibraryCodeForTypes = true,
|
||||
diagnosticMode = 'openFilesOnly',
|
||||
typeCheckingMode = 'basic',
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
82
lua/config/autocmds.lua
Normal file
82
lua/config/autocmds.lua
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
-- Highlight On Yank
|
||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||
desc = "Highlight when yanking (copying) text",
|
||||
group = vim.api.nvim_create_augroup("kickstart-highlight-yank", { clear = true }),
|
||||
callback = function()
|
||||
vim.hl.on_yank()
|
||||
end,
|
||||
})
|
||||
|
||||
-- python specific
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "python",
|
||||
command = "setlocal shiftwidth=4 tabstop=4"
|
||||
})
|
||||
|
||||
-- restore cursor to file position in previous editing session
|
||||
vim.api.nvim_create_autocmd("BufReadPost", {
|
||||
callback = function(args)
|
||||
local mark = vim.api.nvim_buf_get_mark(args.buf, '"')
|
||||
local line_count = vim.api.nvim_buf_line_count(args.buf)
|
||||
if mark[1] > 0 and mark[1] <= line_count then
|
||||
vim.api.nvim_win_set_cursor(0, mark)
|
||||
-- defer centering slightly so it's applied after render
|
||||
vim.schedule(function()
|
||||
vim.cmd("normal! zz")
|
||||
end)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-- open help in vertical split
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "help",
|
||||
command = "wincmd L",
|
||||
})
|
||||
|
||||
-- auto resize splits when the terminal's window is resized
|
||||
vim.api.nvim_create_autocmd("VimResized", {
|
||||
command = "wincmd =",
|
||||
})
|
||||
|
||||
-- no auto continue comments on new line
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
group = vim.api.nvim_create_augroup("no_auto_comment", {}),
|
||||
callback = function()
|
||||
vim.opt_local.formatoptions:remove({ "c", "r", "o" })
|
||||
end,
|
||||
})
|
||||
|
||||
-- ide like highlight when stopping cursor
|
||||
vim.api.nvim_create_autocmd("CursorMoved", {
|
||||
group = vim.api.nvim_create_augroup("LspReferenceHighlight", { clear = true }),
|
||||
desc = "Highlight references under cursor",
|
||||
callback = function()
|
||||
-- Only run if the cursor is not in insert mode
|
||||
if vim.fn.mode() ~= "i" then
|
||||
local clients = vim.lsp.get_clients({ bufnr = 0 })
|
||||
local supports_highlight = false
|
||||
for _, client in ipairs(clients) do
|
||||
if client.server_capabilities.documentHighlightProvider then
|
||||
supports_highlight = true
|
||||
break -- Found a supporting client, no need to check others
|
||||
end
|
||||
end
|
||||
|
||||
-- 3. Proceed only if an LSP is active AND supports the feature
|
||||
if supports_highlight then
|
||||
vim.lsp.buf.clear_references()
|
||||
vim.lsp.buf.document_highlight()
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-- ide like highlight when stopping cursor
|
||||
vim.api.nvim_create_autocmd("CursorMovedI", {
|
||||
group = "LspReferenceHighlight",
|
||||
desc = "Clear highlights when entering insert mode",
|
||||
callback = function()
|
||||
vim.lsp.buf.clear_references()
|
||||
end,
|
||||
})
|
||||
56
lua/config/keymaps.lua
Normal file
56
lua/config/keymaps.lua
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
-- unset space so it can be used as leader
|
||||
vim.keymap.set("n", " ", "", { silent = true, remap = false })
|
||||
|
||||
-- source config
|
||||
vim.keymap.set("n", "<leader>o", ":source $HOME/.config/nvim/init.lua<CR>")
|
||||
|
||||
-- move around windows
|
||||
vim.keymap.set("n", "<C-h>", "<C-w><C-h>", { desc = "focus to l window" })
|
||||
vim.keymap.set("n", "<C-l>", "<C-w><C-l>", { desc = "focus to r window" })
|
||||
vim.keymap.set("n", "<C-j>", "<C-w><C-j>", { desc = "focus to dwn window" })
|
||||
vim.keymap.set("n", "<C-k>", "<C-w><C-k>", { desc = "focus to up window" })
|
||||
|
||||
-- move lines up and down
|
||||
vim.keymap.set("n", "<A-j>", ":m .+1<CR>==")
|
||||
vim.keymap.set("n", "<A-k>", ":m .-2<CR>==")
|
||||
vim.keymap.set("v", "<A-j>", ":m '>+1<CR>gv=gv")
|
||||
vim.keymap.set("v", "<A-k>", ":m '<-2<CR>gv=gv")
|
||||
|
||||
-- quote around highlighted words
|
||||
vim.keymap.set('v', "'", "c''<Esc>P")
|
||||
vim.keymap.set('v', '"', 'c""<Esc>P')
|
||||
|
||||
-- non-floating terminal
|
||||
vim.keymap.set('n', 'T', ":belowright split | terminal<CR> | :resize 8<CR>i")
|
||||
|
||||
-- toggle spellcheck
|
||||
vim.keymap.set('n', '<leader>st', ':set spell!<CR>')
|
||||
|
||||
-- toggle nvim tree
|
||||
vim.keymap.set("n", "<leader>e", ":NvimTreeToggle<CR>")
|
||||
|
||||
-- barbar
|
||||
vim.keymap.set("n", "<leader>x", ":BufferClose<CR>")
|
||||
-- (I need both options, one for windows, one for linux)
|
||||
vim.keymap.set("n", "<A-h>", ":BufferPrevious<CR>")
|
||||
vim.keymap.set("n", "<A-l>", ":BufferNext<CR>")
|
||||
vim.keymap.set("n", "<A-,>", "<Cmd>BufferPrevious<CR>")
|
||||
vim.keymap.set("n", "<A-.>", "<Cmd>BufferNext<CR>")
|
||||
|
||||
-- format
|
||||
vim.keymap.set("n", "<leader>f", ":lua vim.lsp.buf.format()<CR>")
|
||||
|
||||
-- diagnostics
|
||||
vim.keymap.set("n", "<leader>ds", ":lua vim.diagnostic.open_float()<CR>")
|
||||
vim.keymap.set("n", "<leader>dn", function() vim.diagnostic.jump({ count = 1 }) end)
|
||||
vim.keymap.set("n", "<leader>dp", function() vim.diagnostic.jump({ count = -1 }) end)
|
||||
|
||||
-- markdown autocommands
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = 'markdown',
|
||||
callback = function()
|
||||
vim.keymap.set("n", "<leader>[", "i- [ ] <CR><Esc>")
|
||||
vim.keymap.set("n", "m", "^3<right>rx")
|
||||
vim.keymap.set("n", "M", "^3<right>r ")
|
||||
end
|
||||
})
|
||||
3
lua/config/plugins/autosave.lua
Normal file
3
lua/config/plugins/autosave.lua
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
vim.pack.add{"https://github.com/Pocco81/auto-save.nvim"}
|
||||
|
||||
require("auto-save").setup()
|
||||
6
lua/config/plugins/barbar.lua
Normal file
6
lua/config/plugins/barbar.lua
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
vim.pack.add({
|
||||
{ src = "https://github.com/nvim-tree/nvim-web-devicons" },
|
||||
{ src = "https://github.com/romgrk/barbar.nvim" },
|
||||
})
|
||||
|
||||
require("barbar").setup()
|
||||
8
lua/config/plugins/blink.lua
Normal file
8
lua/config/plugins/blink.lua
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
vim.pack.add{"https://github.com/saghen/blink.cmp"}
|
||||
|
||||
require("blink.cmp").setup({
|
||||
keymap = {
|
||||
preset = "enter",
|
||||
["<CR>"] = { "select_and_accept", "fallback" },
|
||||
},
|
||||
})
|
||||
41
lua/config/plugins/dashboard.lua
Normal file
41
lua/config/plugins/dashboard.lua
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
vim.pack.add{"https://github.com/nvimdev/dashboard-nvim"}
|
||||
|
||||
local logo =
|
||||
[[⠀⣰⠋⠀⠀⠀⠀⣸⠃⠀⡞⠀⠀⠀⣠⣏⡧⠤⠶⢶⠾⠳⢤⣇⠀⠀⢠⠞⠁⠀⠀⠀⢱⡀⠀⠀⢸⠁⠹⡄⠀⠀⠀⠀⣧⠀⠀⠀⠀⠀⢸⠀⠀⢠⡀⠀⠸⣄⣀⠀⠀⠀
|
||||
⠀⠛⠒⠒⠒⠒⠚⣇⠀⢸⠃⠀⠀⣴⠟⢹⠉⠀⣤⠋⠀⠀⠀⡏⠐⣰⠋⠀⠀⠀⠀⠀⠀⢻⡄⢢⢼⠒⠒⠻⡖⠲⠤⣴⡘⣦⠀⠀⠀⠀⢸⠀⠀⠀⡇⠀⠀⡁⠉⠉⠛⠒
|
||||
⠀⠀⠀⠀⠀⠀⢀⡏⢠⡿⡄⠀⡼⠃⠀⢸⢴⡜⠁⠀⠀⠀⠀⣇⡼⠁⠀⠀⠀⠀⠀⠀⠀⠀⢳⡀⡾⠀⠀⠀⠙⣄⠀⣸⠙⢻⣄⠀⠀⠀⢸⠀⠀⠀⡇⠀⠀⡇⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠀⠀⢸⣇⡟⡧⠃⡞⠁⠀⠀⠸⠎⠀⠀⠀⠀⠀⠀⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠛⠃⠀⠀⠀⠀⠘⣄⡇⠀⠀⢿⣦⡀⠀⢼⠀⠀⠀⡇⠀⠀⠃⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠀⠀⠸⣿⠤⣇⡞⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠀⠀⠀⠈⣟⠃⠀⡇⠀⠀⢸⠧⠀⢸⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠀⠀⢠⠇⣠⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⡆⢸⢿⠀⠀⡜⠀⠀⣾⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠀⠀⣾⢸⠁⡆⠀⠀⠰⠒⠒⠒⠶⠤⣤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠻⠎⢸⠀⣰⠧⢤⣸⠃⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠀⠀⣿⢸⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠓⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⠤⠒⠒⠒⠛⠛⠒⠒⠲⠄⠀⠀⠀⠀⠘⣧⣯⢤⠀⢻⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠀⢀⣸⡜⣆⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡟⠀⠀⡇⢸⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⢠⡞⠉⠁⠳⣄⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⠁⠀⢸⠀⡄⠀⠀⠀⠀⠀⠀
|
||||
⠀⢀⠴⠋⠀⠀⠀⠀⠙⢇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⠏⠀⣠⢃⡼⠉⠳⣄⠀⠀⠀⠀
|
||||
⢠⣞⠀⣀⠀⠀⠀⠀⠀⢸⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠒⠚⡡⠎⠀⠀⠀⠈⠳⣄⠀⠀
|
||||
⠈⠉⠉⡝⠀⠀⠀⠀⠀⠀⢿⡀⠀⠀⠀⠀⠀⠀⠀⢰⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡾⠶⠖⠋⠀⠀⠀⠈⢠⣀⣶⠽⠂⠀
|
||||
⠀⠀⢸⣥⣠⣤⠀⠀⠀⠀⠀⡹⣦⠀⠀⠀⠀⠀⠀⠀⠈⠑⠒⠢⠤⠤⠤⠤⠤⠤⠤⠤⠤⠴⠒⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣾⠁⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠀⡘⠀⢀⣠⡴⠋⠀⠈⠛⣦⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⡔⠉⠀⠑⢤⣀⠀⠀⠀⣶⠒⠒⠛⠀⠀⠀⠀]]
|
||||
|
||||
logo = string.rep("\n", 8) .. logo .. "\n\n"
|
||||
|
||||
require("dashboard").setup({
|
||||
theme = "hyper",
|
||||
hide = {
|
||||
statusline = true,
|
||||
tabline = true,
|
||||
winbar = true,
|
||||
},
|
||||
config = {
|
||||
shortcut = {
|
||||
{ desc = "変わっていく季節、変わらない毎日。" },
|
||||
},
|
||||
header = vim.split(logo, "\n"),
|
||||
packages = { enable = false },
|
||||
project = { enable = false },
|
||||
mru = { enable = true, limit = 10, label = "最近使ったファイル:", cwd_only = false },
|
||||
footer = function()
|
||||
return { "" }
|
||||
end,
|
||||
},
|
||||
})
|
||||
57
lua/config/plugins/lualine.lua
Normal file
57
lua/config/plugins/lualine.lua
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
vim.pack.add{"https://github.com/nvim-lualine/lualine.nvim"}
|
||||
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = "everforest",
|
||||
component_separators = { left = "", right = "" },
|
||||
section_separators = { left = "", right = "" },
|
||||
disabled_filetypes = {
|
||||
statusline = {},
|
||||
winbar = {},
|
||||
},
|
||||
ignore_focus = {},
|
||||
always_divide_middle = true,
|
||||
always_show_tabline = true,
|
||||
globalstatus = false,
|
||||
refresh = {
|
||||
statusline = 1000,
|
||||
tabline = 1000,
|
||||
winbar = 1000,
|
||||
refresh_time = 16, -- ~60fps
|
||||
events = {
|
||||
"WinEnter",
|
||||
"BufEnter",
|
||||
"BufWritePost",
|
||||
"SessionLoadPost",
|
||||
"FileChangedShellPost",
|
||||
"VimResized",
|
||||
"Filetype",
|
||||
"CursorMoved",
|
||||
"CursorMovedI",
|
||||
"ModeChanged",
|
||||
},
|
||||
},
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { "mode" },
|
||||
lualine_b = { "branch", "diff", "diagnostics" },
|
||||
lualine_c = { "filename" },
|
||||
lualine_x = { "encoding", "fileformat", "filetype" },
|
||||
lualine_y = { "progress" },
|
||||
lualine_z = { "location" },
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = { "filename" },
|
||||
lualine_x = { "location" },
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
},
|
||||
tabline = {},
|
||||
winbar = {},
|
||||
inactive_winbar = {},
|
||||
extensions = {},
|
||||
})
|
||||
|
||||
28
lua/config/plugins/markdown-renderer.lua
Normal file
28
lua/config/plugins/markdown-renderer.lua
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
vim.pack.add({ "https://github.com/MeanderingProgrammer/render-markdown.nvim" })
|
||||
|
||||
require("render-markdown").setup({
|
||||
file_types = { 'markdown', 'quarto' },
|
||||
completions = { lsp = { enabled = true } },
|
||||
|
||||
checkbox = {
|
||||
enabled = true,
|
||||
render_modes = false,
|
||||
bullet = false,
|
||||
left_pad = 0,
|
||||
right_pad = 1,
|
||||
unchecked = {
|
||||
icon = " ",
|
||||
highlight = "RenderMarkdownUnchecked",
|
||||
scope_highlight = nil,
|
||||
},
|
||||
checked = {
|
||||
icon = " ",
|
||||
highlight = "RenderMarkdownChecked",
|
||||
scope_highlight = nil,
|
||||
},
|
||||
custom = {
|
||||
todo = { raw = "[-]", rendered = " ", highlight = "RenderMarkdownTodo", scope_highlight = nil },
|
||||
},
|
||||
scope_priority = nil,
|
||||
},
|
||||
})
|
||||
27
lua/config/plugins/mason.lua
Normal file
27
lua/config/plugins/mason.lua
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
vim.pack.add({
|
||||
{ src = "https://github.com/mason-org/mason.nvim" },
|
||||
{ src = "https://github.com/mason-org/mason-lspconfig.nvim" },
|
||||
{ src = "https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim" },
|
||||
})
|
||||
|
||||
require("mason").setup()
|
||||
require("mason-lspconfig").setup()
|
||||
require("mason-tool-installer").setup({
|
||||
ensure_installed = {
|
||||
"basedpyright",
|
||||
"biome",
|
||||
"djlint",
|
||||
"emmet-language-server",
|
||||
"html-lsp",
|
||||
"lua-language-server",
|
||||
"lwc-language-server",
|
||||
"omnisharp",
|
||||
"prettier",
|
||||
"prettierd",
|
||||
"python-lsp-server",
|
||||
"ruff",
|
||||
"selene",
|
||||
"stylua",
|
||||
"typescript-language-server",
|
||||
},
|
||||
})
|
||||
11
lua/config/plugins/mini.lua
Normal file
11
lua/config/plugins/mini.lua
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
vim.pack.add{"https://github.com/nvim-mini/mini.nvim"}
|
||||
|
||||
require("mini.ai").setup()
|
||||
require("mini.surround").setup()
|
||||
require("mini.pairs").setup({
|
||||
modes = {
|
||||
insert = true,
|
||||
command = true,
|
||||
terminal = false,
|
||||
},
|
||||
})
|
||||
1
lua/config/plugins/nvim-lspconfig.lua
Normal file
1
lua/config/plugins/nvim-lspconfig.lua
Normal file
|
|
@ -0,0 +1 @@
|
|||
vim.pack.add{"https://github.com/neovim/nvim-lspconfig"}
|
||||
3
lua/config/plugins/nvim-tree.lua
Normal file
3
lua/config/plugins/nvim-tree.lua
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
vim.pack.add{"https://github.com/nvim-tree/nvim-tree.lua"}
|
||||
|
||||
require("nvim-tree").setup()
|
||||
19
lua/config/plugins/prettier.lua
Normal file
19
lua/config/plugins/prettier.lua
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
vim.pack.add{"https://github.com/MunifTanjim/prettier.nvim"}
|
||||
|
||||
require("prettier").setup({
|
||||
bin = 'prettier', -- or `'prettierd'` (v0.23.3+)
|
||||
filetypes = {
|
||||
"css",
|
||||
"graphql",
|
||||
"html",
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"json",
|
||||
"less",
|
||||
"markdown",
|
||||
"scss",
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
"yaml",
|
||||
},
|
||||
})
|
||||
10
lua/config/plugins/telescope.lua
Normal file
10
lua/config/plugins/telescope.lua
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
vim.pack.add({
|
||||
{ src = "https://github.com/nvim-lua/plenary.nvim" },
|
||||
{ src = "https://github.com/nvim-telescope/telescope.nvim" },
|
||||
})
|
||||
|
||||
local builtin = require("telescope.builtin")
|
||||
vim.keymap.set("n", "<leader>ff", builtin.find_files, { desc = "Telescope find files" })
|
||||
vim.keymap.set("n", "<leader>fg", builtin.live_grep, { desc = "Telescope live grep" })
|
||||
vim.keymap.set("n", "<leader>fb", builtin.buffers, { desc = "Telescope buffers" })
|
||||
vim.keymap.set("n", "<leader>fh", builtin.help_tags, { desc = "Telescope help tags" })
|
||||
3
lua/config/plugins/theme.lua
Normal file
3
lua/config/plugins/theme.lua
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
vim.pack.add{"https://github.com/neanias/everforest-nvim.git"}
|
||||
|
||||
vim.cmd("colorscheme everforest")
|
||||
67
lua/config/plugins/treesitter.lua
Normal file
67
lua/config/plugins/treesitter.lua
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
vim.pack.add({
|
||||
{
|
||||
src = "https://github.com/nvim-treesitter/nvim-treesitter",
|
||||
branch = "main",
|
||||
build = ":TSUpdate",
|
||||
lazy = false,
|
||||
},
|
||||
{
|
||||
src = "https://github.com/nvim-treesitter/nvim-treesitter-textobjects"
|
||||
}
|
||||
})
|
||||
|
||||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = {},
|
||||
modules = {},
|
||||
sync_install = false,
|
||||
auto_install = true,
|
||||
ignore_install = {},
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
|
||||
-- Automatically jump forward to textobj, similar to targets.vim
|
||||
lookahead = true,
|
||||
|
||||
keymaps = {
|
||||
-- You can use the capture groups defined in textobjects.scm
|
||||
["af"] = "@function.outer",
|
||||
["if"] = "@function.inner",
|
||||
["ac"] = "@class.outer",
|
||||
-- You can optionally set descriptions to the mappings (used in the desc parameter of
|
||||
-- nvim_buf_set_keymap) which plugins like which-key display
|
||||
["ic"] = { query = "@class.inner", desc = "Select inner part of a class region" },
|
||||
-- You can also use captures from other query groups like `locals.scm`
|
||||
["as"] = { query = "@local.scope", query_group = "locals", desc = "Select language scope" },
|
||||
},
|
||||
-- You can choose the select mode (default is charwise 'v')
|
||||
--
|
||||
-- Can also be a function which gets passed a table with the keys
|
||||
-- * query_string: eg '@function.inner'
|
||||
-- * method: eg 'v' or 'o'
|
||||
-- and should return the mode ('v', 'V', or '<c-v>') or a table
|
||||
-- mapping query_strings to modes.
|
||||
selection_modes = {
|
||||
['@parameter.outer'] = 'v', -- charwise
|
||||
['@function.outer'] = 'V', -- linewise
|
||||
['@class.outer'] = '<c-v>', -- blockwise
|
||||
},
|
||||
-- If you set this to `true` (default is `false`) then any textobject is
|
||||
-- extended to include preceding or succeeding whitespace. Succeeding
|
||||
-- whitespace has priority in order to act similarly to eg the built-in
|
||||
-- `ap`.
|
||||
--
|
||||
-- Can also be a function which gets passed a table with the keys
|
||||
-- * query_string: eg '@function.inner'
|
||||
-- * selection_mode: eg 'v'
|
||||
-- and should return true or false
|
||||
include_surrounding_whitespace = true,
|
||||
},
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
19
lua/config/plugins/venv-selector.lua
Normal file
19
lua/config/plugins/venv-selector.lua
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
vim.pack.add({
|
||||
{ src = "https://github.com/mfussenegger/nvim-dap" },
|
||||
{ src = "https://github.com/mfussenegger/nvim-dap-python" },
|
||||
{ src = "https://github.com/linux-cultist/venv-selector.nvim" },
|
||||
})
|
||||
|
||||
require("dap-python").setup("python3")
|
||||
require("venv-selector").setup({
|
||||
-- Optional: Customize search paths for virtual environments
|
||||
search = {
|
||||
-- Example: Add a custom search path
|
||||
-- { path = "~/my_projects/venvs", depth = 1 },
|
||||
},
|
||||
-- Optional: Customize plugin options
|
||||
options = {
|
||||
-- Example: Set a default picker (e.g., "telescope")
|
||||
-- picker = "telescope",
|
||||
},
|
||||
})
|
||||
|
|
@ -24,6 +24,14 @@
|
|||
"rev": "b19413d214068f316c78978b08264ed1c41830ec",
|
||||
"src": "https://github.com/saghen/blink.cmp"
|
||||
},
|
||||
"conform.nvim": {
|
||||
"rev": "1bf8b5b9caee51507aa51eaed3da5b0f2595c6b9",
|
||||
"src": "https://github.com/stevearc/conform.nvim"
|
||||
},
|
||||
"dashboard-nvim": {
|
||||
"rev": "0775e567b6c0be96d01a61795f7b64c1758262f6",
|
||||
"src": "https://github.com/nvimdev/dashboard-nvim"
|
||||
},
|
||||
"everforest-nvim": {
|
||||
"rev": "557bce922401e247a596583679bc181d4d688554",
|
||||
"src": "https://github.com/neanias/everforest-nvim.git"
|
||||
|
|
@ -45,8 +53,16 @@
|
|||
"src": "https://github.com/mason-org/mason.nvim"
|
||||
},
|
||||
"mini.nvim": {
|
||||
"rev": "6e885e4c27743ae6bf5957ea78ce86c032835f09",
|
||||
"src": "https://github.com/echasnovski/mini.nvim"
|
||||
"rev": "72b0194c56c984476c5975b62eb340fd1aa1686a",
|
||||
"src": "https://github.com/nvim-mini/mini.nvim"
|
||||
},
|
||||
"nvim-dap": {
|
||||
"rev": "5860c7c501eb428d3137ee22c522828d20cca0b3",
|
||||
"src": "https://github.com/mfussenegger/nvim-dap"
|
||||
},
|
||||
"nvim-dap-python": {
|
||||
"rev": "64652d1ae1db80870d9aac7132d76e37acd86a26",
|
||||
"src": "https://github.com/mfussenegger/nvim-dap-python"
|
||||
},
|
||||
"nvim-lspconfig": {
|
||||
"rev": "abf6d190f2c06818489c0bd4b926e7e3a06c5e51",
|
||||
|
|
@ -76,10 +92,25 @@
|
|||
"rev": "b9fd5226c2f76c951fc8ed5923d85e4de065e509",
|
||||
"src": "https://github.com/nvim-lua/plenary.nvim"
|
||||
},
|
||||
"prettier.nvim": {
|
||||
"rev": "ca6452de1accc68a1062e72f58679caa488b501a",
|
||||
"src": "https://github.com/MunifTanjim/prettier.nvim"
|
||||
},
|
||||
<<<<<<< Updated upstream
|
||||
=======
|
||||
"render-markdown.nvim": {
|
||||
"rev": "6e0e8902dac70fecbdd8ce557d142062a621ec38",
|
||||
"src": "https://github.com/MeanderingProgrammer/render-markdown.nvim"
|
||||
},
|
||||
>>>>>>> Stashed changes
|
||||
"telescope.nvim": {
|
||||
"rev": "83a3a713d6b2d2a408491a1b959e55a7fa8678e8",
|
||||
"src": "https://github.com/nvim-telescope/telescope.nvim"
|
||||
},
|
||||
"venv-selector.nvim": {
|
||||
"rev": "58bae72c84b9f7f864c879ec1896e384296f9ffb",
|
||||
"src": "https://github.com/linux-cultist/venv-selector.nvim"
|
||||
},
|
||||
"vim-lsp-settings": {
|
||||
"rev": "139d4adf61f0699cc97744d4e6dfb8a6317397f5",
|
||||
"src": "https://github.com/mattn/vim-lsp-settings"
|
||||
|
|
|
|||
Loading…
Reference in a new issue