feat: add ShowFilePath command

main
jaredgoldman 2024-05-05 08:55:15 -04:00
parent 267f59c18a
commit cda2cae5e5
8 changed files with 176 additions and 172 deletions

View File

@ -6,15 +6,15 @@
"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": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"conform.nvim": { "branch": "master", "commit": "4660e534bf7678ee0f85879aa75fdcb6855612c2" }, "conform.nvim": { "branch": "master", "commit": "12b3995537f52ba2810a9857e8ca256881febbda" },
"copilot.vim": { "branch": "release", "commit": "1e135c5303bc60598f6314a2276f31dc91aa34dd" }, "copilot.vim": { "branch": "release", "commit": "1e135c5303bc60598f6314a2276f31dc91aa34dd" },
"dashboard-nvim": { "branch": "master", "commit": "6d06924b562de6f0bb136edf1bf549afbf6b7d00" }, "dashboard-nvim": { "branch": "master", "commit": "1c8b82c5b02bb890862538be2061e37ef801a99b" },
"git-blame.nvim": { "branch": "master", "commit": "ad1d1365c9189d89797fe8d559677d5f55dc2830" }, "git-blame.nvim": { "branch": "master", "commit": "ad1d1365c9189d89797fe8d559677d5f55dc2830" },
"harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" }, "harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" },
"lazy.nvim": { "branch": "main", "commit": "3f13f080434ac942b150679223d54f5ca91e0d52" }, "lazy.nvim": { "branch": "main", "commit": "3f13f080434ac942b150679223d54f5ca91e0d52" },
"lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, "lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a14770dc8c7cb29643870ac79788eec6f7ce1f8" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "273fdde8ac5e51f3a223ba70980e52bbc09d9f6f" },
"mason-nvim-dap.nvim": { "branch": "main", "commit": "67210c0e775adec55de9826b038e8b62de554afc" }, "mason-nvim-dap.nvim": { "branch": "main", "commit": "67210c0e775adec55de9826b038e8b62de554afc" },
"mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" }, "mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" },
"monokai.nvim": { "branch": "master", "commit": "b8bd44d5796503173627d7a1fc51f77ec3a08a63" }, "monokai.nvim": { "branch": "master", "commit": "b8bd44d5796503173627d7a1fc51f77ec3a08a63" },
@ -23,14 +23,14 @@
"nvim-comment": { "branch": "main", "commit": "e9ac16ab056695cad6461173693069ec070d2b23" }, "nvim-comment": { "branch": "main", "commit": "e9ac16ab056695cad6461173693069ec070d2b23" },
"nvim-dap": { "branch": "master", "commit": "6ae8a14828b0f3bff1721a35a1dfd604b6a933bb" }, "nvim-dap": { "branch": "master", "commit": "6ae8a14828b0f3bff1721a35a1dfd604b6a933bb" },
"nvim-grey": { "branch": "main", "commit": "d822f82a990198e354845fe4d191f5f527302444" }, "nvim-grey": { "branch": "main", "commit": "d822f82a990198e354845fe4d191f5f527302444" },
"nvim-lspconfig": { "branch": "master", "commit": "cfa386fc4027e847156ee16141ea1f4c0bc2f0a4" }, "nvim-lspconfig": { "branch": "master", "commit": "aa5f4f4ee10b2688fb37fa46215672441d5cd5d9" },
"nvim-tree.lua": { "branch": "master", "commit": "62008e5cf2e8745c9d23bb599ef642963131057e" }, "nvim-tree.lua": { "branch": "master", "commit": "347e1eb35264677f66a79466bb5e3d111968e12c" },
"nvim-treesitter": { "branch": "master", "commit": "b04ccbd0e041bb05f3eef271124da02497d9d10c" }, "nvim-treesitter": { "branch": "master", "commit": "bbc67f736e22c37c23f2c11a05bfa23b715af30c" },
"nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" }, "nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" },
"nvim-web-devicons": { "branch": "master", "commit": "beb6367ab8496c9e43f22e0252735fdadae1872d" }, "nvim-web-devicons": { "branch": "master", "commit": "794bba734ec95eaff9bb82fbd112473be2087283" },
"plenary.nvim": { "branch": "master", "commit": "5129a3693c482fcbc5ab99a7706ffc4360b995a0" }, "plenary.nvim": { "branch": "master", "commit": "08e301982b9a057110ede7a735dd1b5285eb341f" },
"telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" }, "telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },
"themery.nvim": { "branch": "main", "commit": "1005a58801276d29c4b1e11244cf7631250f9143" }, "themery.nvim": { "branch": "main", "commit": "1005a58801276d29c4b1e11244cf7631250f9143" },
"vim-maximizer": { "branch": "master", "commit": "2e54952fe91e140a2e69f35f22131219fcd9c5f1" }, "vim-maximizer": { "branch": "master", "commit": "2e54952fe91e140a2e69f35f22131219fcd9c5f1" },
"vscode-js-debug": { "branch": "main", "commit": "774a6fb444c75724914f23c2d07e8b0a9fcb080d" } "vscode-js-debug": { "branch": "main", "commit": "0b40365364f2867691701bff5aedf68d7fa0fe9d" }
} }

6
lua/commands.lua 100644
View File

@ -0,0 +1,6 @@
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 })

View File

@ -1,18 +1,20 @@
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', severity_limit = "Warning",
}, },
update_in_insert = true, update_in_insert = true,
} })
)

View File

@ -6,6 +6,7 @@ require("conform").setup({
javascriptreact = { "prettierd", "prettier" }, javascriptreact = { "prettierd", "prettier" },
typescriptreact = { "prettierd", "prettier" }, typescriptreact = { "prettierd", "prettier" },
json = { { "prettierd", "prettier" } }, json = { { "prettierd", "prettier" } },
jsonc = { { "prettierd", "prettier" } },
markdown = { { "marksman", "prettier", "prettierd" } }, markdown = { { "marksman", "prettier", "prettierd" } },
}, },
}) })

View File

@ -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",
}, },
}) })

View File

@ -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()
@ -69,3 +66,4 @@ for _, lsp in ipairs(servers) do
}, },
}) })
end end

View File

@ -57,3 +57,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

View File

@ -85,7 +85,7 @@ require("lazy").setup({
{ {
"mfussenegger/nvim-dap", "mfussenegger/nvim-dap",
opt = true, opt = true,
run = "npm install --legacy-peer-deps && npx gulp vsDebugServerBundle && mv dist out" run = "npm install --legacy-peer-deps && npx gulp vsDebugServerBundle && mv dist out",
}, },
"jay-babu/mason-nvim-dap.nvim", "jay-babu/mason-nvim-dap.nvim",
"microsoft/vscode-js-debug", "microsoft/vscode-js-debug",