Compare commits
10 Commits
28db441192
...
24f8d2889b
Author | SHA1 | Date |
---|---|---|
jaredgoldman | 24f8d2889b | |
jaredgoldman | 539437fbec | |
jaredgoldman | dba8b88fc3 | |
jaredgoldman | b2f19111c5 | |
jaredgoldman | 92c08534aa | |
jaredgoldman | cda2cae5e5 | |
jaredgoldman | 267f59c18a | |
jaredgoldman | bbd51a0b85 | |
jaredgoldman | 74781e2d6d | |
jaredgoldman | b45fe90dd4 |
2
init.lua
2
init.lua
|
@ -13,6 +13,6 @@ require("config.harpoon")
|
||||||
require("config.autopairs")
|
require("config.autopairs")
|
||||||
require("config.autotags")
|
require("config.autotags")
|
||||||
require("config.conform")
|
require("config.conform")
|
||||||
-- require("config.dashboard")
|
|
||||||
require("options")
|
require("options")
|
||||||
require("keymaps")
|
require("keymaps")
|
||||||
|
require("commands")
|
||||||
|
|
|
@ -1,34 +1,36 @@
|
||||||
{
|
{
|
||||||
"FTerm.nvim": { "branch": "master", "commit": "d1320892cc2ebab472935242d9d992a2c9570180" },
|
"FTerm.nvim": { "branch": "master", "commit": "d1320892cc2ebab472935242d9d992a2c9570180" },
|
||||||
"LuaSnip": { "branch": "master", "commit": "8ae1dedd988eb56441b7858bd1e8554dfadaa46d" },
|
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
|
||||||
"catppuccin": { "branch": "main", "commit": "02bdd749931a5d739063562e57531c118e081882" },
|
"catppuccin": { "branch": "main", "commit": "0b5df9c9e641b1212b21a0762ccad4434fd41322" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||||
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
|
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "9d5ba06d6ee7418c674f498634617416d15b6239" },
|
"conform.nvim": { "branch": "master", "commit": "797de8f79055334104cf77893cd93fe3fc2ac154" },
|
||||||
"copilot.vim": { "branch": "release", "commit": "f45ecd95c1474885e278f20d6ae86a6e30de2151" },
|
"copilot.vim": { "branch": "release", "commit": "25f73977033c597d530c7ab0e211d99b60927d2d" },
|
||||||
"dashboard-nvim": { "branch": "master", "commit": "681300934baf36f6184ca41f0b26aed22056d4ee" },
|
"dashboard-nvim": { "branch": "master", "commit": "fabf5feec96185817c732d47d363f34034212685" },
|
||||||
"git-blame.nvim": { "branch": "master", "commit": "a0282d05adbee80aaf4e2ff35b81b52940b67bed" },
|
"git-blame.nvim": { "branch": "master", "commit": "408d5487d908dfe5d48e5645d8b27ddcc16b11e0" },
|
||||||
"harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" },
|
"harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "31ddbea7c10b6920c9077b66c97951ca8682d5c8" },
|
"lazy.nvim": { "branch": "main", "commit": "9a374a0fb4d3ac42dac4a129d4bead7252473c77" },
|
||||||
"lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" },
|
"lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
|
"lualine.nvim": { "branch": "master", "commit": "544dd1583f9bb27b393f598475c89809c4d5e86b" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "44509689b9bf3984d729cc264aacb31cb7f41668" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "58bc9119ca273c0ce5a66fad1927ef0f617bd81b" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" },
|
"mason-nvim-dap.nvim": { "branch": "main", "commit": "4ba55f9755ebe8297d92c419b90a946123292ae6" },
|
||||||
|
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||||
"monokai.nvim": { "branch": "master", "commit": "b8bd44d5796503173627d7a1fc51f77ec3a08a63" },
|
"monokai.nvim": { "branch": "master", "commit": "b8bd44d5796503173627d7a1fc51f77ec3a08a63" },
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "4f41e5940bc0443fdbe5f995e2a596847215cd2a" },
|
"nvim-autopairs": { "branch": "master", "commit": "78a4507bb9ffc9b00f11ae0ac48243d00cb9194d" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "ce16de5665c766f39c271705b17fff06f7bcb84f" },
|
"nvim-cmp": { "branch": "main", "commit": "d818fd0624205b34e14888358037fb6f5dc51234" },
|
||||||
"nvim-comment": { "branch": "main", "commit": "e9ac16ab056695cad6461173693069ec070d2b23" },
|
"nvim-comment": { "branch": "main", "commit": "e9ac16ab056695cad6461173693069ec070d2b23" },
|
||||||
"nvim-dap": { "branch": "master", "commit": "405df1dcc2e395ab5173a9c3d00e03942c023074" },
|
"nvim-dap": { "branch": "master", "commit": "bc03b83c94d0375145ff5ac6a6dcf28c1241e06f" },
|
||||||
"nvim-grey": { "branch": "main", "commit": "e5fc8cc1e0c88c23bc6c92845f19a342f561c409" },
|
"nvim-grey": { "branch": "main", "commit": "b57f62baddc5a295bd0ffd61ff9a671a149df95a" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "e25c4cdecd3d58c0deccce0f372426c8c480bcce" },
|
"nvim-lspconfig": { "branch": "master", "commit": "e26da408cf955afa8e9ddbadd510e84ea8976cd7" },
|
||||||
"nvim-tree.lua": { "branch": "master", "commit": "81eb8d519233c105f30dc0a278607e62b20502fd" },
|
"nvim-tree.lua": { "branch": "master", "commit": "f9ff00bc06d7cb70548a3847d7a2a05e928bc988" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "2bad828b48aed74efe8f7e4ea15550e18c7b482d" },
|
"nvim-treesitter": { "branch": "master", "commit": "4e387dd47833c1bb8c8df6c3a7cab0d4c55583f3" },
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" },
|
"nvim-ts-autotag": { "branch": "main", "commit": "1624866a1379fc1861797f0ed05899a9c1d2ff61" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "6e355632387a085f15a66ad68cf681c1d7374a04" },
|
"nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" },
|
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },
|
"telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },
|
||||||
"themery.nvim": { "branch": "main", "commit": "1005a58801276d29c4b1e11244cf7631250f9143" },
|
"themery.nvim": { "branch": "main", "commit": "f745a49d9c103babde35e1111b91faa6bc591d5c" },
|
||||||
"vim-maximizer": { "branch": "master", "commit": "2e54952fe91e140a2e69f35f22131219fcd9c5f1" }
|
"vim-maximizer": { "branch": "master", "commit": "2e54952fe91e140a2e69f35f22131219fcd9c5f1" },
|
||||||
|
"vscode-js-debug": { "branch": "main", "commit": "29ba3af04e436d85b035a08c03f55e421679fc25" }
|
||||||
}
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
local api = vim.api
|
||||||
|
|
||||||
|
-- Show file path in command bar
|
||||||
|
api.nvim_create_user_command("ShowFilePath", function()
|
||||||
|
print(vim.fn.expand("%:p"))
|
||||||
|
end, { bang = true })
|
||||||
|
|
||||||
|
-- Toggle wrap
|
||||||
|
vim.api.nvim_create_user_command("ToggleWrap", function()
|
||||||
|
if vim.wo.wrap then
|
||||||
|
vim.wo.wrap = false
|
||||||
|
print("Word wrap disabled")
|
||||||
|
else
|
||||||
|
vim.wo.wrap = true
|
||||||
|
vim.wo.linebreak = true
|
||||||
|
vim.wo.breakindent = true
|
||||||
|
print("Word wrap enabled")
|
||||||
|
end
|
||||||
|
end, {})
|
|
@ -1,18 +1,21 @@
|
||||||
require'nvim-treesitter.configs'.setup {
|
require("nvim-treesitter.configs").setup({
|
||||||
autotag = {
|
autotag = {
|
||||||
enable = true,
|
enable = true,
|
||||||
}
|
},
|
||||||
}
|
opts = function(_, opts)
|
||||||
|
if type(opts.ensure_installed) == "table" then
|
||||||
|
vim.list_extend(opts.ensure_installed, { "typescript", "tsx" })
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
-- Enable update on insert
|
-- Enable update on insert
|
||||||
vim.lsp.handlers['textDocument/publishDiagnostics'] = vim.lsp.with(
|
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
|
||||||
vim.lsp.diagnostic.on_publish_diagnostics,
|
|
||||||
{
|
|
||||||
underline = true,
|
underline = true,
|
||||||
virtual_text = {
|
virtual_text = {
|
||||||
spacing = 5,
|
spacing = 5,
|
||||||
severity_limit = 'Warning',
|
min = vim.diagnostic.severity.WARN, -- Updated from severity_limit
|
||||||
},
|
},
|
||||||
update_in_insert = true,
|
update_in_insert = true,
|
||||||
}
|
})
|
||||||
)
|
-- severity_limit is deprecated, use {min = severity} See vim.diagnostic.severity instead. :help deprecated Feature will be removed in Nvim 0.11
|
||||||
|
|
|
@ -3,8 +3,11 @@ require("conform").setup({
|
||||||
lua = { "stylua" },
|
lua = { "stylua" },
|
||||||
javascript = { { "prettierd", "prettier" } },
|
javascript = { { "prettierd", "prettier" } },
|
||||||
typescript = { { "prettierd", "prettier" } },
|
typescript = { { "prettierd", "prettier" } },
|
||||||
|
javascriptreact = { "prettierd", "prettier" },
|
||||||
|
typescriptreact = { "prettierd", "prettier" },
|
||||||
json = { { "prettierd", "prettier" } },
|
json = { { "prettierd", "prettier" } },
|
||||||
markdown = { { "marksman", "prettierd", "prettier" } },
|
jsonc = { { "prettierd", "prettier" } },
|
||||||
|
markdown = { { "marksman", "prettier", "prettierd" } },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
require("dap-vscode-js").setup({
|
||||||
|
-- node_path = "node", -- Path of node executable. Defaults to $NODE_PATH, and then "node"
|
||||||
|
-- debugger_path = "(runtimedir)/site/pack/packer/opt/vscode-js-debug", -- Path to vscode-js-debug installation.
|
||||||
|
-- debugger_cmd = { "js-debug-adapter" }, -- Command to use to launch the debug server. Takes precedence over `node_path` and `debugger_path`.
|
||||||
|
adapters = { 'pwa-node', 'pwa-chrome', 'pwa-msedge', 'node-terminal', 'pwa-extensionHost' }, -- which adapters to register in nvim-dap
|
||||||
|
-- log_file_path = "(stdpath cache)/dap_vscode_js.log" -- Path for file logging
|
||||||
|
-- log_file_level = false -- Logging level for output to file. Set to false to disable file logging.
|
||||||
|
-- log_console_level = vim.log.levels.ERROR -- Logging level for output to console. Set to false to disable console output.
|
||||||
|
})
|
||||||
|
|
||||||
|
for _, language in ipairs({ "typescript", "javascript" }) do
|
||||||
|
require("dap").configurations[language] = {
|
||||||
|
{
|
||||||
|
{
|
||||||
|
type = "pwa-node",
|
||||||
|
request = "launch",
|
||||||
|
name = "Launch file",
|
||||||
|
program = "${file}",
|
||||||
|
cwd = "${workspaceFolder}",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "pwa-node",
|
||||||
|
request = "attach",
|
||||||
|
name = "Attach",
|
||||||
|
processId = require 'dap.utils'.pick_process,
|
||||||
|
cwd = "${workspaceFolder}",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
|
@ -0,0 +1,63 @@
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
M.dashboard_config = function()
|
||||||
|
local logo = [[
|
||||||
|
██╗ ██╗██╗███╗ ███╗
|
||||||
|
██║ ██║██║████╗ ████║
|
||||||
|
██║ ██║██║██╔████╔██║
|
||||||
|
╚██╗ ██╔╝██║██║╚██╔╝██║
|
||||||
|
╚████╔╝ ██║██║ ╚═╝ ██║
|
||||||
|
╚═══╝ ╚═╝╚═╝ ╚═╝
|
||||||
|
]]
|
||||||
|
|
||||||
|
logo = string.rep("\n", 8) .. logo .. "\n\n"
|
||||||
|
|
||||||
|
local opts = {
|
||||||
|
theme = "doom",
|
||||||
|
hide = {
|
||||||
|
statusline = false,
|
||||||
|
},
|
||||||
|
config = {
|
||||||
|
header = vim.split(logo, "\n"),
|
||||||
|
-- stylua: ignore
|
||||||
|
center = {
|
||||||
|
{ action = "Telescope find_files", desc = " Find File", icon = " ", key = "f" },
|
||||||
|
{ action = "ene | startinsert", desc = " New File", icon = " ", key = "n" },
|
||||||
|
{ action = "Telescope oldfiles", desc = " Recent Files", icon = " ", key = "r" },
|
||||||
|
{ action = "Telescope live_grep", desc = " Find Text", icon = " ", key = "g" },
|
||||||
|
-- { action = [[lua Lazy.telescope.config_files()()]], desc = " Config", icon = " ", key = "c" },
|
||||||
|
-- { action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" },
|
||||||
|
-- { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" },
|
||||||
|
{ action = "Lazy", desc = " Lazy", icon = " ", key = "l" },
|
||||||
|
{ action = "qa", desc = " Quit", icon = " ", key = "q" },
|
||||||
|
},
|
||||||
|
footer = function()
|
||||||
|
local stats = require("lazy").stats()
|
||||||
|
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
||||||
|
return {
|
||||||
|
"⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms",
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, button in ipairs(opts.config.center) do
|
||||||
|
button.desc = button.desc .. string.rep(" ", 43 - #button.desc)
|
||||||
|
button.key_format = " %s"
|
||||||
|
end
|
||||||
|
|
||||||
|
-- close Lazy and re-open when the dashboard is ready
|
||||||
|
if vim.o.filetype == "lazy" then
|
||||||
|
vim.cmd.close()
|
||||||
|
vim.api.nvim_create_autocmd("User", {
|
||||||
|
pattern = "DashboardLoaded",
|
||||||
|
callback = function()
|
||||||
|
require("lazy").show()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
return opts
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
|
@ -21,13 +21,15 @@ local function toggle_telescope(harpoon_files)
|
||||||
:find()
|
:find()
|
||||||
end
|
end
|
||||||
|
|
||||||
local function maybe_remove_add()
|
local function toggle_mark()
|
||||||
local bufnr = api.nvim_get_current_buf()
|
local current_file = api.nvim_buf_get_name(0) -- Get the current buffer's file path
|
||||||
local mark = harpoon:mark(bufnr)
|
local item, index = harpoon:list():get_by_value(current_file)
|
||||||
if mark then
|
if item then
|
||||||
harpoon:list():add()
|
harpoon:list():remove_at(index)
|
||||||
|
print("Removed from Harpoon: " .. current_file)
|
||||||
else
|
else
|
||||||
harpoon:list():remove()
|
harpoon:list():add({ value = current_file })
|
||||||
|
print("Added to Harpoon: " .. current_file)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -39,13 +41,7 @@ api.nvim_create_user_command("HarpoonAdd", function()
|
||||||
harpoon:list():add()
|
harpoon:list():add()
|
||||||
end, { bang = true })
|
end, { bang = true })
|
||||||
api.nvim_create_user_command("HarpoonToggleFile", function()
|
api.nvim_create_user_command("HarpoonToggleFile", function()
|
||||||
maybe_remove_add()
|
toggle_mark()
|
||||||
end, { bang = true })
|
|
||||||
api.nvim_create_user_command("HarpoonTogglePrev", function()
|
|
||||||
harpoon:list():prev()
|
|
||||||
end, { bang = true })
|
|
||||||
api.nvim_create_user_command("HarpoonToggleNext", function()
|
|
||||||
harpoon:list():next()
|
|
||||||
end, { bang = true })
|
end, { bang = true })
|
||||||
api.nvim_create_user_command("HarpoonUI", function()
|
api.nvim_create_user_command("HarpoonUI", function()
|
||||||
toggle_telescope(harpoon:list())
|
toggle_telescope(harpoon:list())
|
||||||
|
|
|
@ -11,15 +11,8 @@ require("mason").setup({
|
||||||
-- A list of servers to automatically install if they're not already installed
|
-- A list of servers to automatically install if they're not already installed
|
||||||
require("mason-lspconfig").setup({
|
require("mason-lspconfig").setup({
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"cssls",
|
|
||||||
"cssmodules_ls",
|
|
||||||
"graphql",
|
|
||||||
"html",
|
|
||||||
"intelephense",
|
|
||||||
"tailwindcss",
|
|
||||||
"tsserver",
|
"tsserver",
|
||||||
"jsonls",
|
"jsonls",
|
||||||
"lua_ls",
|
"lua_ls",
|
||||||
"marksman",
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -4,6 +4,7 @@ require("nvim-tree").setup({
|
||||||
},
|
},
|
||||||
view = {
|
view = {
|
||||||
width = 30,
|
width = 30,
|
||||||
|
side = "right",
|
||||||
},
|
},
|
||||||
renderer = {
|
renderer = {
|
||||||
group_empty = true,
|
group_empty = true,
|
||||||
|
|
|
@ -1,30 +1,15 @@
|
||||||
local actions = require("telescope.actions")
|
local actions = require("telescope.actions")
|
||||||
|
|
||||||
require('telescope').setup {
|
require("telescope").setup({
|
||||||
defaults = {
|
defaults = {
|
||||||
-- Default configuration for telescope goes here:
|
-- Default configuration for telescope goes here:
|
||||||
-- config_key = value,
|
-- config_key = value,
|
||||||
mappings = {
|
mappings = {
|
||||||
i = {
|
i = {
|
||||||
["<esc>"] = actions.close,
|
["<esc>"] = actions.close,
|
||||||
["<C-u>"] = false
|
["<C-u>"] = false,
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
pickers = {
|
|
||||||
-- Default configuration for builtin pickers goes here:
|
|
||||||
-- picker_name = {
|
|
||||||
-- picker_config_key = value,
|
|
||||||
-- ...
|
|
||||||
-- }
|
|
||||||
-- Now the picker_config_key will be applied every time you call this
|
|
||||||
-- builtin picker
|
|
||||||
},
|
},
|
||||||
extensions = {
|
},
|
||||||
-- Your extension configuration goes here:
|
})
|
||||||
-- extension_name = {
|
|
||||||
-- extension_config_key = value,
|
|
||||||
-- }
|
|
||||||
-- please take a look at the readme of the extension you want to configure
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -14,6 +14,5 @@ require("themery").setup({
|
||||||
colorscheme = "catppuccin-mocha",
|
colorscheme = "catppuccin-mocha",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
themeConfigFile = "~/.config/nvim/lua/config/theme.lua", -- Desibed below
|
|
||||||
livePreview = true, -- Apply theme while browsing. Default to true.
|
livePreview = true, -- Apply theme while browsing. Default to true.
|
||||||
})
|
})
|
||||||
|
|
|
@ -30,13 +30,15 @@ local mappings = {
|
||||||
-- FTerm
|
-- FTerm
|
||||||
["<leader>h"] = "<cmd>FTermToggle<CR>",
|
["<leader>h"] = "<cmd>FTermToggle<CR>",
|
||||||
-- Harpoon
|
-- Harpoon
|
||||||
["<leader>a"] = "<cmd>HarpoonAdd<CR>",
|
["<leader>a"] = "<cmd>HarpoonToggleFile<CR>",
|
||||||
["<C-e>"] = "<cmd>HarpoonUI<CR>",
|
["<C-e>"] = "<cmd>HarpoonUI<CR>",
|
||||||
["<leader>c"] = "<cmd>HarpoonClear<CR>",
|
["<leader>c"] = "<cmd>HarpoonClear<CR>",
|
||||||
-- Formating
|
-- Formating
|
||||||
["<leader>fm"] = "<cmd>Format<CR>",
|
["<leader>fm"] = "<cmd>Format<CR>",
|
||||||
-- Disable help menu
|
-- Disable help menu
|
||||||
["<F1>"] = "<nop>",
|
["<F1>"] = "<nop>",
|
||||||
|
-- Toggle word wrap
|
||||||
|
["<leader>w"] = "<cmd>ToggleWrap<CR>",
|
||||||
},
|
},
|
||||||
x = {
|
x = {
|
||||||
["<A-j>"] = ":move '>+1<CR>gv-gv",
|
["<A-j>"] = ":move '>+1<CR>gv-gv",
|
||||||
|
|
10
lua/lsp.lua
10
lua/lsp.lua
|
@ -31,10 +31,7 @@ end
|
||||||
|
|
||||||
local servers = {
|
local servers = {
|
||||||
"tsserver",
|
"tsserver",
|
||||||
"intelephense",
|
|
||||||
"tailwindcss",
|
|
||||||
"lua_ls",
|
"lua_ls",
|
||||||
"marksman",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
@ -61,5 +58,12 @@ for _, lsp in ipairs(servers) do
|
||||||
lspconfig[lsp].setup({
|
lspconfig[lsp].setup({
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
|
-- For suppressing vim error messages in config
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
diagnostics = { globals = { "vim" } },
|
||||||
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,8 @@ opt.cursorline = true -- highlight cursor line underneath the cursor horizontall
|
||||||
opt.splitbelow = true -- open new vertical split bottom
|
opt.splitbelow = true -- open new vertical split bottom
|
||||||
opt.splitright = true -- open new horizontal splits right
|
opt.splitright = true -- open new horizontal splits right
|
||||||
opt.termguicolors = true -- enabl 24-bit RGB color in the TUI
|
opt.termguicolors = true -- enabl 24-bit RGB color in the TUI
|
||||||
|
api.nvim_set_hl(0, "LineNr", { fg = "#5f87af", blend = 0 })
|
||||||
|
api.nvim_set_hl(0, "CursorLineNr", { fg = "#ffd700", blend = 0 })
|
||||||
-- Searching
|
-- Searching
|
||||||
opt.incsearch = true -- search as characters are entered
|
opt.incsearch = true -- search as characters are entered
|
||||||
opt.hlsearch = false -- do not highlight matches
|
opt.hlsearch = false -- do not highlight matches
|
||||||
|
@ -57,3 +58,7 @@ vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
formatter.format(nil)
|
formatter.format(nil)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Logging --
|
||||||
|
-- opt.verbosefile = '~/.config/nvim/nvim_log' -- Set the location for the log file
|
||||||
|
-- opt.verbose = 15 -- Set the verbosity level
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
local dashboard = require("config.dashboard")
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
|
||||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||||
|
@ -14,77 +15,20 @@ end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
|
-- Dashboard
|
||||||
{
|
{
|
||||||
"nvimdev/dashboard-nvim",
|
"nvimdev/dashboard-nvim",
|
||||||
event = "VimEnter",
|
event = "VimEnter",
|
||||||
opts = function()
|
opts = dashboard.dashboard_config,
|
||||||
local logo = [[
|
|
||||||
██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z
|
|
||||||
██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z
|
|
||||||
██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║██║██╔████╔██║ z
|
|
||||||
██║ ██╔══██║ ███╔╝ ╚██╔╝ ╚██╗ ██╔╝██║██║╚██╔╝██║ z
|
|
||||||
███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║
|
|
||||||
╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝
|
|
||||||
]]
|
|
||||||
|
|
||||||
logo = string.rep("\n", 8) .. logo .. "\n\n"
|
|
||||||
|
|
||||||
local opts = {
|
|
||||||
theme = "doom",
|
|
||||||
hide = {
|
|
||||||
-- this is taken care of by lualine
|
|
||||||
-- enabling this messes up the actual laststatus setting after loading a file
|
|
||||||
statusline = false,
|
|
||||||
},
|
|
||||||
config = {
|
|
||||||
header = vim.split(logo, "\n"),
|
|
||||||
-- stylua: ignore
|
|
||||||
center = {
|
|
||||||
-- { action = LazyVim.telescope("files"), desc = " Find File", icon = " ", key = "f" },
|
|
||||||
{ action = "ene | startinsert", desc = " New File", icon = " ", key = "n" },
|
|
||||||
{ action = "Telescope oldfiles", desc = " Recent Files", icon = " ", key = "r" },
|
|
||||||
{ action = "Telescope live_grep", desc = " Find Text", icon = " ", key = "g" },
|
|
||||||
{ action = [[lua LazyVim.telescope.config_files()()]], desc = " Config", icon = " ", key = "c" },
|
|
||||||
{ action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" },
|
|
||||||
{ action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" },
|
|
||||||
{ action = "Lazy", desc = " Lazy", icon = " ", key = "l" },
|
|
||||||
{ action = "qa", desc = " Quit", icon = " ", key = "q" },
|
|
||||||
},
|
|
||||||
footer = function()
|
|
||||||
local stats = require("lazy").stats()
|
|
||||||
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
|
||||||
return {
|
|
||||||
"⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms",
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, button in ipairs(opts.config.center) do
|
|
||||||
button.desc = button.desc .. string.rep(" ", 43 - #button.desc)
|
|
||||||
button.key_format = " %s"
|
|
||||||
end
|
|
||||||
|
|
||||||
-- close Lazy and re-open when the dashboard is ready
|
|
||||||
if vim.o.filetype == "lazy" then
|
|
||||||
vim.cmd.close()
|
|
||||||
vim.api.nvim_create_autocmd("User", {
|
|
||||||
pattern = "DashboardLoaded",
|
|
||||||
callback = function()
|
|
||||||
require("lazy").show()
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
return opts
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
|
-- Theming
|
||||||
"tanvirtin/monokai.nvim",
|
"tanvirtin/monokai.nvim",
|
||||||
|
"yorickpeterse/nvim-grey",
|
||||||
|
{ "catppuccin/nvim", name = "catppuccin", priority = 1000 },
|
||||||
{
|
{
|
||||||
"onsails/lspkind.nvim",
|
"onsails/lspkind.nvim",
|
||||||
event = { "VimEnter" },
|
event = { "VimEnter" },
|
||||||
},
|
},
|
||||||
{ "catppuccin/nvim", name = "catppuccin", priority = 1000 },
|
|
||||||
-- Auto-completion engine
|
-- Auto-completion engine
|
||||||
{
|
{
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
|
@ -115,6 +59,7 @@ require("lazy").setup({
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
tag = "0.1.6",
|
tag = "0.1.6",
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
requires = { "tami5/sqlite.lua" },
|
||||||
},
|
},
|
||||||
"zaldih/themery.nvim",
|
"zaldih/themery.nvim",
|
||||||
"terrortylor/nvim-comment",
|
"terrortylor/nvim-comment",
|
||||||
|
@ -138,11 +83,16 @@ require("lazy").setup({
|
||||||
},
|
},
|
||||||
"windwp/nvim-ts-autotag",
|
"windwp/nvim-ts-autotag",
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
{
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
|
opt = true,
|
||||||
|
run = "npm install --legacy-peer-deps && npx gulp vsDebugServerBundle && mv dist out",
|
||||||
|
},
|
||||||
|
"jay-babu/mason-nvim-dap.nvim",
|
||||||
|
"microsoft/vscode-js-debug",
|
||||||
{
|
{
|
||||||
"stevearc/conform.nvim",
|
"stevearc/conform.nvim",
|
||||||
opts = {},
|
opts = {},
|
||||||
},
|
},
|
||||||
"f-person/git-blame.nvim",
|
"f-person/git-blame.nvim",
|
||||||
"yorickpeterse/nvim-grey",
|
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# Requirements for my setup
|
# Requirements for my setup
|
||||||
|
|
||||||
- file tree x
|
- file tree x
|
||||||
- lsp with mason x
|
- lsp with mason x
|
||||||
- telescope x
|
- telescope x
|
||||||
|
@ -10,5 +11,7 @@
|
||||||
- extended history x
|
- extended history x
|
||||||
- auto-pairs x
|
- auto-pairs x
|
||||||
- lua vim linting x
|
- lua vim linting x
|
||||||
- dashboard
|
- dashboard x
|
||||||
|
- suppress vim global warnings x
|
||||||
|
- harpoon toggle file x
|
||||||
- debugger
|
- debugger
|
||||||
|
|
Loading…
Reference in New Issue