commit - 9474a7d3e3947c6cde2fde8a76926024de4287a3
commit + 8f25fd11b64f9e16db18d8213fdc1791ac39066f
blob - /dev/null
blob + 9bc96d544e1b659520e85c1173344c43844e1d70 (mode 644)
--- /dev/null
+++ Untitled
+ sf
blob - 2dc964bbda3cb36ba407e012b9e7ad2a0d52270f
blob + 3be45a6df1c0fe10a0c6315ccd818800227d60f9
--- lua/config/keymaps.lua
+++ lua/config/keymaps.lua
lsp_map('<leader>lr', vim.lsp.buf.rename, 'Rename across multiple files', 'n')
lsp_map('<leader>ca', vim.lsp.buf.code_action, 'Code actions', { 'n', 'x' })
lsp_map('<leader>lt', require('telescope.builtin').lsp_type_definitions, 'Type Definition')
+
+ lsp_map('<leader>lc', function()
+ local line = vim.api.nvim_win_get_cursor(0)[1] - 1
+ if line < 0 then
+ vim.notify('Invalid line number', vim.log.levels.ERROR)
+ return
+ end
+
+ local diagnostics = vim.diagnostic.get(0, { lnum = line })
+ if not diagnostics or #diagnostics == 0 then
+ vim.notify('No diagnostics found', vim.log.levels.WARN)
+ return
+ end
+
+ local first_diagnostic = diagnostics[1]
+ local diagnostic_text =
+ string.format('%s: %s', vim.diagnostic.severity[first_diagnostic.severity], first_diagnostic.message)
+
+ vim.fn.setreg('+', diagnostic_text)
+
+ vim.notify('First diagnostic copied to clipboard', vim.log.levels.INFO)
+ end, 'Copy first error diagnostic', 'n')
+
lsp_map('<leader>le', function()
require('telescope.builtin').diagnostics({
- severity = vim.diagnostic.severity.ERROR, -- Filter by ERROR severity
bufnr = 0, -- Current buffer
line = vim.api.nvim_win_get_cursor(0)[1], -- Current line
prompt_title = 'Line Error Diagnostics',
blob - 87e3069f119148666208ef3918f258d8966ea823
blob + f052dc21a8a93422fcc33990c64fbf2478693a48
--- lua/plugins/conform.lua
+++ lua/plugins/conform.lua
go = { 'gofmt' },
typescript = { 'prettier' },
javascript = { 'prettier' },
+ python = { 'black' },
},
},
},
blob - b401a9f845b04bf7c5aee2ae2673e24f5070dead
blob + 28f2f5f42b6a7a3d148be202672327fcec3d8adc
--- lua/plugins/lspconfig.lua
+++ lua/plugins/lspconfig.lua
},
},
},
+ intelephense = {
+ init_options = {
+ globalStoragePath = os.getenv('HOME') .. '/.local/share/intelephense',
+ },
+ },
}
-
local lspconfig = require('lspconfig')
for server_name, server_config in pairs(servers) do
lspconfig[server_name].setup(vim.tbl_deep_extend('force', {