Compare commits
29 Commits
Pre-COC
...
New-Master
| Author | SHA1 | Date | |
|---|---|---|---|
| 143ca6b166 | |||
| f7f6dc35e1 | |||
| c12621a215 | |||
| 0b240bf871 | |||
| e3a19d78b5 | |||
| 239149d1d3 | |||
| 4af56857b4 | |||
| d81ff48af0 | |||
| f0cd5945e1 | |||
| 20165cfee1 | |||
| 6d2ae4db0e | |||
| cc174a1ec8 | |||
| a9e3cd2d68 | |||
| eba485e086 | |||
| 6d181f0f4b | |||
| fcc084630a | |||
| 1a9f6bc5bd | |||
| 7f4bf08c64 | |||
| 09c8354089 | |||
| 8954b671f6 | |||
| 27d301895b | |||
| a1e3a88169 | |||
| ca31baa065 | |||
| bc9cb89e8f | |||
| bc458aec5a | |||
| 1e613cef53 | |||
| 709a1bdda6 | |||
| c4322b2b5a | |||
| 5caec86949 |
@@ -102,3 +102,4 @@ The configuration automatically detects TTY environments and disables icons/comp
|
|||||||
- **Claude Code**: Primary AI assistant with keymaps under `<leader>a` for chat, diff management, and file operations
|
- **Claude Code**: Primary AI assistant with keymaps under `<leader>a` for chat, diff management, and file operations
|
||||||
- **Avante**: Secondary AI integration (currently configured for Copilot provider)
|
- **Avante**: Secondary AI integration (currently configured for Copilot provider)
|
||||||
- **GitHub Copilot**: Code completion integration via copilot.vim
|
- **GitHub Copilot**: Code completion integration via copilot.vim
|
||||||
|
- Were no longer using nvim_cmp having switched to coc
|
||||||
95
coc-settings.json
Normal file
95
coc-settings.json
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
{
|
||||||
|
"coc.preferences.timeout": 300,
|
||||||
|
"suggest.enablePreview": true,
|
||||||
|
"suggest.floatEnable": true,
|
||||||
|
"suggest.detailField": "preview",
|
||||||
|
"suggest.maxPreviewWidth": 80,
|
||||||
|
"signature.enable": false,
|
||||||
|
"signature.target": "float",
|
||||||
|
"extensions": [
|
||||||
|
"coc-json",
|
||||||
|
"coc-html",
|
||||||
|
"coc-css",
|
||||||
|
"coc-pyright",
|
||||||
|
"coc-clangd",
|
||||||
|
"coc-rust-analyzer",
|
||||||
|
"coc-yaml",
|
||||||
|
"coc-tsserver",
|
||||||
|
"coc-lua",
|
||||||
|
"coc-sh",
|
||||||
|
"coc-go",
|
||||||
|
"coc-prettier",
|
||||||
|
"coc-eslint",
|
||||||
|
"coc-markdownlint",
|
||||||
|
"coc-vimlsp"
|
||||||
|
],
|
||||||
|
"pyright.enable": true,
|
||||||
|
"pyright.organizeimports.provider": "pyright",
|
||||||
|
"python.analysis.autoImportCompletions": true,
|
||||||
|
"python.analysis.autoSearchPaths": true,
|
||||||
|
"python.analysis.diagnosticMode": "workspace",
|
||||||
|
"python.analysis.typeCheckingMode": "basic",
|
||||||
|
"rust-analyzer.enable": true,
|
||||||
|
"rust-analyzer.cargo.loadOutDirsFromCheck": true,
|
||||||
|
"rust-analyzer.procMacro.enable": true,
|
||||||
|
"clangd.enabled": true,
|
||||||
|
"clangd.fallbackFlags": ["-std=c++17"],
|
||||||
|
"html.enable": true,
|
||||||
|
"css.enable": true,
|
||||||
|
"typescript.enable": true,
|
||||||
|
"javascript.enable": true,
|
||||||
|
"eslint.enable": true,
|
||||||
|
"prettier.enable": true,
|
||||||
|
"languageserver": {
|
||||||
|
"zig": {
|
||||||
|
"command": "zls",
|
||||||
|
"filetypes": ["zig"],
|
||||||
|
"rootPatterns": ["build.zig", "build.zig.zon"],
|
||||||
|
"settings": {
|
||||||
|
"zls": {
|
||||||
|
"enable_snippets": true,
|
||||||
|
"enable_ast_check_diagnostics": true,
|
||||||
|
"enable_build_on_save": true,
|
||||||
|
"build_on_save_step": "check"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nim": {
|
||||||
|
"command": "nimlangserver",
|
||||||
|
"filetypes": ["nim"],
|
||||||
|
"rootPatterns": ["*.nimble", "*.nim"],
|
||||||
|
"settings": {
|
||||||
|
"nim": {
|
||||||
|
"nimsuggestPath": "nimsuggest",
|
||||||
|
"timeout": 120000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"vlang": {
|
||||||
|
"command": "vls",
|
||||||
|
"filetypes": ["v"],
|
||||||
|
"rootPatterns": ["v.mod"]
|
||||||
|
},
|
||||||
|
"lua": {
|
||||||
|
"command": "lua-language-server",
|
||||||
|
"filetypes": ["lua"],
|
||||||
|
"rootPatterns": [".luarc.json", ".luacheckrc", ".stylua.toml", "stylua.toml", "selene.toml"],
|
||||||
|
"settings": {
|
||||||
|
"Lua": {
|
||||||
|
"runtime": {
|
||||||
|
"version": "LuaJIT"
|
||||||
|
},
|
||||||
|
"diagnostics": {
|
||||||
|
"globals": ["vim"]
|
||||||
|
},
|
||||||
|
"workspace": {
|
||||||
|
"library": {
|
||||||
|
"${3rd}/luv/library": true,
|
||||||
|
"${3rd}/busted/library": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
131
init.lua
131
init.lua
@@ -8,40 +8,105 @@ require("utils.reload") -- ./lua/utils/reload.lua
|
|||||||
require("vimwiki") -- ./lua/vimwiki.lua
|
require("vimwiki") -- ./lua/vimwiki.lua
|
||||||
require("keymaps") -- ./lua/keymaps.lua
|
require("keymaps") -- ./lua/keymaps.lua
|
||||||
require("lsp") -- ./lua/lsp.lua
|
require("lsp") -- ./lua/lsp.lua
|
||||||
require("completion") -- ./lua/completion.lua
|
-- require("completion") -- ./lua/completion.lua
|
||||||
|
require("coc") -- ./lua/coc.lua
|
||||||
require("treesitter") -- ./lua/treesitter.lua
|
require("treesitter") -- ./lua/treesitter.lua
|
||||||
require("autocmds") -- ./lua/autocmds.lua
|
require("autocmds") -- ./lua/autocmds.lua
|
||||||
require("diagnostics") -- ./lua/diagnostics.lua
|
require("diagnostics") -- ./lua/diagnostics.lua
|
||||||
require('telescope_configuration') -- ./lua/telescope_configuration.lua
|
require('telescope_configuration') -- ./lua/telescope_configuration.lua
|
||||||
|
|
||||||
|
local function cyberdream()
|
||||||
|
require("cyberdream").setup({
|
||||||
|
-- Set light or dark variant
|
||||||
|
variant = "default", -- use "light" for the light variant. Also accepts "auto" to set dark or light colors based on the current value of `vim.o.background`
|
||||||
|
-- Enable transparent background
|
||||||
|
transparent = true,
|
||||||
|
-- Reduce the overall saturation of colours for a more muted look
|
||||||
|
saturation = 1, -- accepts a value between 0 and 1. 0 will be fully desaturated (greyscale) and 1 will be the full color (default)
|
||||||
|
-- Enable italics comments
|
||||||
|
italic_comments = true,
|
||||||
|
-- Replace all fillchars with ' ' for the ultimate clean look
|
||||||
|
hide_fillchars = false,
|
||||||
|
-- Apply a modern borderless look to pickers like Telescope, Snacks Picker & Fzf-Lua
|
||||||
|
borderless_pickers = true,
|
||||||
|
-- Set terminal colors used in `:terminal`
|
||||||
|
terminal_colors = true,
|
||||||
|
-- Improve start up time by caching highlights. Generate cache with :CyberdreamBuildCache and clear with :CyberdreamClearCache
|
||||||
|
cache = false,
|
||||||
|
-- Override highlight groups with your own colour values
|
||||||
|
-- highlights = {
|
||||||
|
-- -- Highlight groups to override, adding new groups is also possible
|
||||||
|
-- -- See `:h highlight-groups` for a list of highlight groups or run `:hi` to see all groups and their current values
|
||||||
|
-- -- Example:
|
||||||
|
-- Comment = { fg = "#696969", bg = "NONE", italic = true },
|
||||||
|
-- -- More examples can be found in `lua/cyberdream/extensions/*.lua`
|
||||||
|
-- },
|
||||||
|
-- Override a highlight group entirely using the built-in colour palette
|
||||||
|
-- overrides = function(colors) -- NOTE: This function nullifies the `highlights` option
|
||||||
|
-- -- Example:
|
||||||
|
-- return {
|
||||||
|
-- Comment = { fg = colors.green, bg = "NONE", italic = true },
|
||||||
|
-- ["@property"] = { fg = colors.magenta, bold = true },
|
||||||
|
-- }
|
||||||
|
-- end,
|
||||||
|
-- Override colors
|
||||||
|
-- colors = {
|
||||||
|
-- -- For a list of colors see `lua/cyberdream/colours.lua`
|
||||||
|
-- -- Override colors for both light and dark variants
|
||||||
|
-- bg = "#000000",
|
||||||
|
-- green = "#00ff00",
|
||||||
|
-- -- If you want to override colors for light or dark variants only, use the following format:
|
||||||
|
-- dark = {
|
||||||
|
-- magenta = "#ff00ff",
|
||||||
|
-- fg = "#eeeeee",
|
||||||
|
-- },
|
||||||
|
-- light = {
|
||||||
|
-- red = "#ff5c57",
|
||||||
|
-- cyan = "#5ef1ff",
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- Disable or enable colorscheme extensions
|
||||||
|
extensions = {
|
||||||
|
telescope = true,
|
||||||
|
notify = true,
|
||||||
|
mini = true,
|
||||||
|
treesitter = true,
|
||||||
|
-- More extensions can be found in `lua/cyberdream/extensions/*.lua`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
if host == "xps13" then
|
if host == "xps13" then
|
||||||
require('tokyonight').setup({
|
cyberdream()
|
||||||
style = "moon", -- "storm", "moon", "day", "night"
|
-- require('tokyonight').setup({
|
||||||
transparent = false, -- Enable transparent background
|
-- style = "moon", -- "storm", "moon", "day", "night"
|
||||||
terminal_colors = true, -- Enable terminal colors
|
-- transparent = false, -- Enable transparent background
|
||||||
styles = {
|
-- terminal_colors = true, -- Enable terminal colors
|
||||||
comments = { italic = true }, -- Italic comments
|
-- styles = {
|
||||||
keywords = { italic = true }, -- Italic keywords
|
-- comments = { italic = true }, -- Italic comments
|
||||||
functions = { bold = true }, -- Bold functions
|
-- keywords = { italic = true }, -- Italic keywords
|
||||||
variables = {}, -- No special style for variables
|
-- functions = { bold = true }, -- Bold functions
|
||||||
sidebars = "dark", -- Dark sidebars
|
-- variables = {}, -- No special style for variables
|
||||||
floats = "dark", -- Dark floating windows
|
-- sidebars = "dark", -- Dark sidebars
|
||||||
},
|
-- floats = "dark", -- Dark floating windows
|
||||||
})
|
-- },
|
||||||
|
-- })
|
||||||
|
-- })
|
||||||
elseif host == "Titan" then
|
elseif host == "Titan" then
|
||||||
require('tokyonight').setup({
|
cyberdream()
|
||||||
style = "storm", -- "storm", "moon", "day", "night"
|
-- require('tokyonight').setup({
|
||||||
transparent = false, -- Enable transparent background
|
-- style = "storm", -- "storm", "moon", "day", "night"
|
||||||
terminal_colors = true, -- Enable terminal colors
|
-- transparent = false, -- Enable transparent background
|
||||||
styles = {
|
-- terminal_colors = true, -- Enable terminal colors
|
||||||
comments = { italic = true }, -- Italic comments
|
-- styles = {
|
||||||
keywords = { italic = true }, -- Italic keywords
|
-- comments = { italic = true }, -- Italic comments
|
||||||
functions = { bold = true }, -- Bold functions
|
-- keywords = { italic = true }, -- Italic keywords
|
||||||
variables = {}, -- No special style for variables
|
-- functions = { bold = true }, -- Bold functions
|
||||||
sidebars = "dark", -- Dark sidebars
|
-- variables = {}, -- No special style for variables
|
||||||
floats = "dark", -- Dark floating windows
|
-- sidebars = "dark", -- Dark sidebars
|
||||||
},
|
-- floats = "dark", -- Dark floating windows
|
||||||
})
|
-- },
|
||||||
|
-- })
|
||||||
end
|
end
|
||||||
|
|
||||||
local function is_linux_console()
|
local function is_linux_console()
|
||||||
@@ -54,10 +119,11 @@ local function want_truecolor()
|
|||||||
or ((vim.env.COLORTERM or ""):lower():find("truecolor") ~= nil)
|
or ((vim.env.COLORTERM or ""):lower():find("truecolor") ~= nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local function set_colorscheme()
|
local function set_colorscheme()
|
||||||
if want_truecolor() then
|
if want_truecolor() then
|
||||||
vim.o.termguicolors = true
|
vim.o.termguicolors = true
|
||||||
if not pcall(vim.cmd.colorscheme, "tokyonight") then
|
if not pcall(vim.cmd.colorscheme, "cyberdream") then
|
||||||
pcall(vim.cmd.colorscheme, "habamax")
|
pcall(vim.cmd.colorscheme, "habamax")
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@@ -91,7 +157,12 @@ vim.api.nvim_create_autocmd("VimEnter", {
|
|||||||
lualine_a = { "mode" },
|
lualine_a = { "mode" },
|
||||||
lualine_b = { "branch" },
|
lualine_b = { "branch" },
|
||||||
lualine_c = { { "filename", file_status = true, path = 1 } },
|
lualine_c = { { "filename", file_status = true, path = 1 } },
|
||||||
lualine_x = { "encoding", "fileformat", "filetype" },
|
lualine_x = {
|
||||||
|
"encoding", "fileformat", "filetype",
|
||||||
|
require("noice").api.statusline.mode.get,
|
||||||
|
cond = require("noice").api.statusline.mode.has,
|
||||||
|
color = { fg = "#ff9e64" },
|
||||||
|
},
|
||||||
lualine_y = { "progress" },
|
lualine_y = { "progress" },
|
||||||
lualine_z = { "location" },
|
lualine_z = { "location" },
|
||||||
},
|
},
|
||||||
@@ -99,7 +170,7 @@ vim.api.nvim_create_autocmd("VimEnter", {
|
|||||||
else
|
else
|
||||||
lualine.setup({
|
lualine.setup({
|
||||||
options = {
|
options = {
|
||||||
theme = "tokyonight",
|
theme = "auto",
|
||||||
icons_enabled = true,
|
icons_enabled = true,
|
||||||
globalstatus = true,
|
globalstatus = true,
|
||||||
},
|
},
|
||||||
|
|||||||
44
lua/coc.lua
Normal file
44
lua/coc.lua
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
-- CoC configuration
|
||||||
|
vim.g.coc_global_extensions = {
|
||||||
|
'coc-json',
|
||||||
|
'coc-html',
|
||||||
|
'coc-css',
|
||||||
|
'coc-pyright',
|
||||||
|
'coc-clangd',
|
||||||
|
'coc-rust-analyzer',
|
||||||
|
'coc-yaml',
|
||||||
|
'coc-tsserver',
|
||||||
|
'coc-lua',
|
||||||
|
'coc-sh',
|
||||||
|
'coc-go',
|
||||||
|
'coc-prettier',
|
||||||
|
'coc-eslint',
|
||||||
|
'coc-markdownlint',
|
||||||
|
'coc-vimlsp'
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Use <Tab> and <S-Tab> to navigate completion list
|
||||||
|
vim.keymap.set('i', '<Tab>', function()
|
||||||
|
if vim.fn['coc#pum#visible']() == 1 then
|
||||||
|
return vim.fn['coc#pum#next'](1)
|
||||||
|
else
|
||||||
|
return '<Tab>'
|
||||||
|
end
|
||||||
|
end, { expr = true, silent = true })
|
||||||
|
|
||||||
|
vim.keymap.set('i', '<S-Tab>', function()
|
||||||
|
if vim.fn['coc#pum#visible']() == 1 then
|
||||||
|
return vim.fn['coc#pum#prev'](1)
|
||||||
|
else
|
||||||
|
return '<S-Tab>'
|
||||||
|
end
|
||||||
|
end, { expr = true, silent = true })
|
||||||
|
|
||||||
|
-- Use <CR> to confirm completion
|
||||||
|
vim.keymap.set('i', '<CR>', function()
|
||||||
|
if vim.fn['coc#pum#visible']() == 1 then
|
||||||
|
return vim.fn['coc#pum#confirm']()
|
||||||
|
else
|
||||||
|
return '<CR>'
|
||||||
|
end
|
||||||
|
end, { expr = true, silent = true })
|
||||||
@@ -15,8 +15,21 @@ cmp.setup({
|
|||||||
return vim_item
|
return vim_item
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
-- completion = {
|
||||||
|
-- completeopt = 'menu,menuone,noinsert',
|
||||||
|
-- },
|
||||||
|
completion = {
|
||||||
|
completeopt = 'menu,menuone,noinsert',
|
||||||
|
},
|
||||||
|
performance = {
|
||||||
|
max_view_entries = 10,
|
||||||
|
},
|
||||||
window = {
|
window = {
|
||||||
completion = cmp.config.window.bordered(),
|
completion = cmp.config.window.bordered({
|
||||||
|
-- winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,Search:None",
|
||||||
|
col_offset = -3,
|
||||||
|
side_padding = 0,
|
||||||
|
}),
|
||||||
documentation = cmp.config.window.bordered(),
|
documentation = cmp.config.window.bordered(),
|
||||||
},
|
},
|
||||||
mapping = cmp.mapping.preset.insert({
|
mapping = cmp.mapping.preset.insert({
|
||||||
@@ -88,55 +101,51 @@ cmp.setup.cmdline(":", {
|
|||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Set up lspconfig.
|
-- LSP server configurations moved to lsp.lua to avoid duplicates
|
||||||
-- require("cmp_nvim_lsp").default_capabilities()
|
-- local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
-- require("lspconfig").clangd.setup({
|
||||||
require("lspconfig").clangd.setup({
|
-- capabilities = capabilities,
|
||||||
capabilities = capabilities,
|
-- })
|
||||||
})
|
-- require("lspconfig").taplo.setup({
|
||||||
require("lspconfig").taplo.setup({
|
-- capabilities = capabilities,
|
||||||
capabilities = capabilities,
|
-- })
|
||||||
})
|
-- require("lspconfig").marksman.setup({
|
||||||
require("lspconfig").marksman.setup({
|
-- capabilities = capabilities,
|
||||||
capabilities = capabilities,
|
-- })
|
||||||
})
|
-- require("lspconfig").lua_ls.setup({
|
||||||
require("lspconfig").lua_ls.setup({
|
-- capabilities = capabilities,
|
||||||
capabilities = capabilities,
|
-- })
|
||||||
})
|
-- require("lspconfig").rust_analyzer.setup({
|
||||||
require("lspconfig").rust_analyzer.setup({
|
-- capabilities = capabilities,
|
||||||
capabilities = capabilities,
|
-- })
|
||||||
})
|
-- require("lspconfig").zls.setup({
|
||||||
require("lspconfig").zls.setup({
|
-- capabilities = capabilities,
|
||||||
capabilities = capabilities,
|
-- })
|
||||||
})
|
-- require("lspconfig").gopls.setup({
|
||||||
require("lspconfig").gopls.setup({
|
-- capabilities = capabilities,
|
||||||
capabilities = capabilities,
|
-- settings = {
|
||||||
settings = {
|
-- gopls = {
|
||||||
gopls = {
|
-- analyses = {
|
||||||
analyses = {
|
-- unusedparams = true,
|
||||||
unusedparams = true,
|
-- unusedwrite = true,
|
||||||
unusedwrite = true,
|
-- shadow = true,
|
||||||
shadow = true,
|
-- },
|
||||||
},
|
-- staticcheck = true,
|
||||||
staticcheck = true,
|
-- usePlaceholders = true,
|
||||||
usePlaceholders = true,
|
-- hints = {
|
||||||
hints = {
|
-- assignVariableTypes = true,
|
||||||
assignVariableTypes = true,
|
-- compositeLiteralFields = true,
|
||||||
compositeLiteralFields = true,
|
-- compositeLiteralTypes = true,
|
||||||
compositeLiteralTypes = true,
|
-- functionTypeParameters = true,
|
||||||
functionTypeParameters = true,
|
-- parameterNames = true,
|
||||||
parameterNames = true,
|
-- rangeVariableTypes = true,
|
||||||
rangeVariableTypes = true,
|
-- },
|
||||||
},
|
-- },
|
||||||
},
|
-- },
|
||||||
},
|
-- })
|
||||||
})
|
-- require("lspconfig").pyright.setup({
|
||||||
require("lspconfig").basedpyright.setup({
|
-- capabilities = capabilities,
|
||||||
capabilities = capabilities,
|
-- })
|
||||||
})
|
-- require("lspconfig").nim_langserver.setup({
|
||||||
require("lspconfig").nim_langserver.setup({
|
-- capabilities = capabilities,
|
||||||
capabilities = capabilities,
|
-- })
|
||||||
})
|
|
||||||
-- require'lspconfig'.jedi_language_server.setup {
|
|
||||||
-- capabilities = capabilities,
|
|
||||||
-- }
|
|
||||||
|
|||||||
@@ -157,6 +157,7 @@ function t3_make_ctags()
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
pattern = { "markdown", "norg", "md", "wiki" }, -- Set for markdown file type
|
pattern = { "markdown", "norg", "md", "wiki" }, -- Set for markdown file type
|
||||||
callback = function()
|
callback = function()
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ vim.keymap.set("n", "<M-x>_", ":resize -5<CR>", { desc = "Decrease Window Height
|
|||||||
|
|
||||||
|
|
||||||
-- CTRL X Maps
|
-- CTRL X Maps
|
||||||
|
vim.keymap.set("n", "<C-x>", "", { desc = "Ctrl-X"})
|
||||||
vim.keymap.set("n", "<C-x><C-b>", ":Pick buffers<CR>", { desc = "Buffer Picker"})
|
vim.keymap.set("n", "<C-x><C-b>", ":Pick buffers<CR>", { desc = "Buffer Picker"})
|
||||||
vim.keymap.set("n", "<C-x><C-f>", ":Pick files<CR>", { desc = "File Picker"})
|
vim.keymap.set("n", "<C-x><C-f>", ":Pick files<CR>", { desc = "File Picker"})
|
||||||
vim.keymap.set("n", "<C-x><C-h>", ":Pick help<CR>", { desc = "Help Picker"})
|
vim.keymap.set("n", "<C-x><C-h>", ":Pick help<CR>", { desc = "Help Picker"})
|
||||||
@@ -100,13 +101,19 @@ vim.keymap.set("n", "<C-x><C-n>v", "<cmd>TWView<cr>", { desc = "View Tasks", nor
|
|||||||
vim.keymap.set("n", "<C-x><C-n>u", "<cmd>TWUpdateCurrent<cr>", { desc="Update Tasks", noremap = true, silent = true })
|
vim.keymap.set("n", "<C-x><C-n>u", "<cmd>TWUpdateCurrent<cr>", { desc="Update Tasks", noremap = true, silent = true })
|
||||||
vim.keymap.set("n", "<C-x><C-n>s", "<cmd>TWSyncTasks<cr>", { desc = "Sync Tasks", noremap = true, silent = true })
|
vim.keymap.set("n", "<C-x><C-n>s", "<cmd>TWSyncTasks<cr>", { desc = "Sync Tasks", noremap = true, silent = true })
|
||||||
vim.keymap.set("n", "<C-x><C-n><c-space>", "<cmd>TWToggle<cr>", { desc = "Toggle Taskwarrior", silent = true })
|
vim.keymap.set("n", "<C-x><C-n><c-space>", "<cmd>TWToggle<cr>", { desc = "Toggle Taskwarrior", silent = true })
|
||||||
|
vim.keymap.set("n", "<C-x><C-d>", "", { desc = "Devdocs"})
|
||||||
|
vim.keymap.set("n", "<C-x><C-d>i", ":DevdocsInstall ", { desc = "Install Docset"})
|
||||||
|
vim.keymap.set("n", "<C-x><C-d>o", ":DevdocsOpen ", { desc = "Open Docs In Window"})
|
||||||
|
vim.keymap.set("n", "<C-x><C-d>f", ":DevdocsOpenFloat ", { desc = "Open Docs In Float"})
|
||||||
|
vim.keymap.set("n", "<C-x><C-d>t", "<cmd>DevdocsToggle<cr>", { desc = "Toggle Float"})
|
||||||
|
|
||||||
|
|
||||||
-- FN Keys --
|
-- FN Keys --
|
||||||
vim.keymap.set("n", "<F1>", ":nohlsearch<CR>", { desc = "Clear Search Highlight"})
|
vim.keymap.set("n", "<F1>", ":nohlsearch<CR>", { desc = "Clear Search Highlight"})
|
||||||
vim.keymap.set("n", "<F2>", ":UndotreeToggle<CR>", { desc = "Undo Tree Toggle"})
|
vim.keymap.set("n", "<F2>", ":UndotreeToggle<CR>", { desc = "Undo Tree Toggle"})
|
||||||
vim.keymap.set("n", "<F3>", ":Ranger<CR>", { desc = "Ranger"})
|
vim.keymap.set("n", "<F3>", ":Ranger<CR>", { desc = "Ranger"})
|
||||||
vim.keymap.set("n", "<c-F3>", ":RangerNewTab<CR>", { desc = "Ranger New Tab"})
|
vim.keymap.set("n", "<c-F3>", ":RangerNewTab<CR>", { desc = "Ranger New Tab"})
|
||||||
vim.keymap.set("n", "<F9>", ":Telescope live_grep<CR>", { desc = "Live Grep"})
|
vim.keymap.set("n", "<f9>", ":Telescope live_grep<cr>", { desc = "live grep"})
|
||||||
vim.keymap.set("n", "<F11>", ":setlocal spell! spelllang=en_us<CR>", { desc = "Toggle Spell Check"})
|
vim.keymap.set("n", "<F11>", ":setlocal spell! spelllang=en_us<CR>", { desc = "Toggle Spell Check"})
|
||||||
vim.keymap.set("n", "<F12>", ":setlocal wrap!<CR>", { desc = "Toggle Line Wrap"})
|
vim.keymap.set("n", "<F12>", ":setlocal wrap!<CR>", { desc = "Toggle Line Wrap"})
|
||||||
|
|
||||||
@@ -121,12 +128,6 @@ vim.keymap.set( "v", "<leader>as", "<cmd>ClaudeCodeSend<cr>", {desc = "Send to C
|
|||||||
-- vim.keymap.set( "n", "<leader>as", "<cmd>ClaudeCodeTreeAdd<cr>", {desc = "Add file", ft = { "NvimTree", "neo-tree", "oil", "minifiles" }})
|
-- vim.keymap.set( "n", "<leader>as", "<cmd>ClaudeCodeTreeAdd<cr>", {desc = "Add file", ft = { "NvimTree", "neo-tree", "oil", "minifiles" }})
|
||||||
vim.keymap.set( "n", "<leader>aa", "<cmd>ClaudeCodeDiffAccept<cr>", {desc = "Accept diff" })
|
vim.keymap.set( "n", "<leader>aa", "<cmd>ClaudeCodeDiffAccept<cr>", {desc = "Accept diff" })
|
||||||
vim.keymap.set( "n", "<leader>ad", "<cmd>ClaudeCodeDiffDeny<cr>", {desc = "Deny diff" })
|
vim.keymap.set( "n", "<leader>ad", "<cmd>ClaudeCodeDiffDeny<cr>", {desc = "Deny diff" })
|
||||||
-- LSP Related Keys --
|
|
||||||
vim.keymap.set( "n", "<leader>l", "", {desc = "LSP" })
|
|
||||||
vim.keymap.set( "n", "<leader>lo", "", {desc = "LSP Overlays" })
|
|
||||||
vim.keymap.set( "n", "<leader>los", "<cmd>Trouble symbols<cr>", {desc = "Symbols" })
|
|
||||||
vim.keymap.set( "n", "<leader>lod", "<cmd>Trouble diagnostics<cr>", {desc = "Diagnostics" })
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
pattern = { "NvimTree", "neo-tree", "oil", "minifiles" },
|
pattern = { "NvimTree", "neo-tree", "oil", "minifiles" },
|
||||||
callback = function()
|
callback = function()
|
||||||
@@ -136,3 +137,24 @@ vim.api.nvim_create_autocmd("FileType", {
|
|||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- COC Keybindings
|
||||||
|
|
||||||
|
vim.keymap.set( "n", "K", function() _G.ShowDocumentation() end, { noremap = true, silent = true, desc = "Show Documentation" })
|
||||||
|
vim.keymap.set( "n", "<leader>l", "", {desc = "LSP" })
|
||||||
|
vim.keymap.set( "n", "<leader>lc", "", {desc = "Completions" })
|
||||||
|
vim.keymap.set( "n", "<leader>lch", "<cmd>CocCommand document.toggleInlayHint<cr>", {desc = "Toggle Inline Hints" })
|
||||||
|
vim.keymap.set( "n", "<leader>lcs", "<cmd>CocOutline<cr>", {desc = "Show Symbol Outline" })
|
||||||
|
vim.keymap.set( "n", "<leader>lcl", "<cmd>CocCommand document.toggleCodeLens<cr>", {desc = "Show Code Lens" })
|
||||||
|
vim.keymap.set( "n", "<leader>lo", "", {desc = "Overlays" })
|
||||||
|
vim.keymap.set( "n", "<leader>lod", "<cmd>Trouble dignostics<cr>", {desc = "Diagnostics" })
|
||||||
|
vim.keymap.set( "n", "<leader>los", "<cmd>Trouble symbols<cr>", {desc = "Symbols" })
|
||||||
|
|
||||||
|
-- Tag-like functionality using LSP
|
||||||
|
vim.keymap.set( "n", "<leader>lt", "", {desc = "Tags" })
|
||||||
|
vim.keymap.set( "n", "<leader>lts", ":Telescope lsp_document_symbols<CR>", {desc = "Document Symbols" })
|
||||||
|
vim.keymap.set( "n", "<leader>ltw", ":Telescope lsp_workspace_symbols<CR>", {desc = "Workspace Symbols" })
|
||||||
|
vim.keymap.set( "n", "<leader>ltd", ":Telescope lsp_dynamic_workspace_symbols<CR>", {desc = "Dynamic Workspace Symbols" })
|
||||||
|
vim.keymap.set( "n", "<C-]>", "<cmd>lua vim.lsp.buf.definition()<cr>", {desc = "Go to Definition" })
|
||||||
|
vim.keymap.set( "n", "<C-t>", "<C-o>", {desc = "Jump Back" })
|
||||||
|
vim.keymap.set( "n", "g]", "<cmd>lua vim.lsp.buf.references()<cr>", {desc = "Find References" })
|
||||||
|
|||||||
139
lua/lsp.lua
139
lua/lsp.lua
@@ -40,147 +40,32 @@ vim.lsp.enable('basedpyright', {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Alternative: If you have regular pyright installed
|
|
||||||
-- vim.lsp.enable('pyright', {
|
|
||||||
-- settings = {
|
|
||||||
-- python = {
|
|
||||||
-- analysis = {
|
|
||||||
-- typeCheckingMode = "basic",
|
|
||||||
-- autoSearchPaths = true,
|
|
||||||
-- useLibraryCodeForTypes = true,
|
|
||||||
-- diagnosticMode = "workspace",
|
|
||||||
-- }
|
|
||||||
-- }
|
|
||||||
-- }
|
|
||||||
-- })
|
|
||||||
|
|
||||||
-- Alternative: Manual LSP start if vim.lsp.enable doesn't work
|
|
||||||
-- vim.api.nvim_create_autocmd('FileType', {
|
|
||||||
-- pattern = 'python',
|
|
||||||
-- callback = function()
|
|
||||||
-- -- Check if basedpyright is available first
|
|
||||||
-- if vim.fn.executable('basedpyright-langserver') == 1 then
|
|
||||||
-- vim.lsp.start({
|
|
||||||
-- name = 'basedpyright',
|
|
||||||
-- cmd = { 'basedpyright-langserver', '--stdio' },
|
|
||||||
-- root_dir = vim.fs.dirname(
|
|
||||||
-- vim.fs.find({ 'pyproject.toml', 'setup.py', '.git' }, { upward = true })[1]
|
|
||||||
-- ),
|
|
||||||
-- settings = {
|
|
||||||
-- basedpyright = {
|
|
||||||
-- analysis = {
|
|
||||||
-- typeCheckingMode = "basic",
|
|
||||||
-- autoSearchPaths = true,
|
|
||||||
-- useLibraryCodeForTypes = true,
|
|
||||||
-- }
|
|
||||||
-- }
|
|
||||||
-- }
|
|
||||||
-- })
|
|
||||||
-- elseif vim.fn.executable('pyright-langserver') == 1 then
|
|
||||||
-- vim.lsp.start({
|
|
||||||
-- name = 'pyright',
|
|
||||||
-- cmd = { 'pyright-langserver', '--stdio' },
|
|
||||||
-- root_dir = vim.fs.dirname(
|
|
||||||
-- vim.fs.find({ 'pyproject.toml', 'setup.py', '.git' }, { upward = true })[1]
|
|
||||||
-- ),
|
|
||||||
-- settings = {
|
|
||||||
-- python = {
|
|
||||||
-- analysis = {
|
|
||||||
-- typeCheckingMode = "basic",
|
|
||||||
-- autoSearchPaths = true,
|
|
||||||
-- useLibraryCodeForTypes = true,
|
|
||||||
-- }
|
|
||||||
-- }
|
|
||||||
-- }
|
|
||||||
-- })
|
|
||||||
-- else
|
|
||||||
-- print("Neither basedpyright-langserver nor pyright-langserver found")
|
|
||||||
-- end
|
|
||||||
-- end,
|
|
||||||
-- })
|
|
||||||
|
|
||||||
require("lsp_signature").setup({
|
require("lsp_signature").setup({
|
||||||
debug = false,
|
debug = false,
|
||||||
bind = true,
|
bind = true,
|
||||||
doc_lines = 10,
|
doc_lines = 5,
|
||||||
max_height = 12,
|
max_height = 8,
|
||||||
max_width = function() return math.floor(vim.api.nvim_win_get_width(0) * 0.8) end,
|
max_width = function() return math.floor(vim.api.nvim_win_get_width(0) * 0.7) end,
|
||||||
wrap = true,
|
wrap = true,
|
||||||
floating_window = true,
|
floating_window = true,
|
||||||
floating_window_above_cur_line = true,
|
floating_window_above_cur_line = false,
|
||||||
floating_window_off_x = 1,
|
floating_window_off_x = 1,
|
||||||
floating_window_off_y = 0,
|
floating_window_off_y = 1,
|
||||||
hint_enable = true,
|
-- hint_enable = true,
|
||||||
|
hint_enable = false,
|
||||||
hint_inline = function() return false end,
|
hint_inline = function() return false end,
|
||||||
hint_prefix = "🐼 ",
|
-- hint_prefix = "🐼 ",
|
||||||
|
hint_prefix = "",
|
||||||
hint_scheme = "String",
|
hint_scheme = "String",
|
||||||
hi_parameter = "LspSignatureActiveParameter",
|
hi_parameter = "LspSignatureActiveParameter",
|
||||||
handler_opts = { border = "rounded" },
|
handler_opts = { border = "rounded" },
|
||||||
always_trigger = false,
|
always_trigger = false,
|
||||||
|
auto_close_after = 5,
|
||||||
extra_trigger_chars = { "(", "," },
|
extra_trigger_chars = { "(", "," },
|
||||||
zindex = 200,
|
-- zindex = 200,
|
||||||
|
zindex = 50,
|
||||||
padding = "",
|
padding = "",
|
||||||
timer_interval = 200,
|
timer_interval = 200,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- local vim = vim
|
|
||||||
-- -- vim.cmd [[
|
|
||||||
-- -- augroup LspCompletion
|
|
||||||
-- -- autocmd!
|
|
||||||
-- -- autocmd InsertEnter * setlocal omnifunc=v:lua.vim.lsp.omnifunc
|
|
||||||
-- -- autocmd TextChangedI * if pumvisible() == 0 | silent! lua vim.fn.complete(vim.fn.col('.'), vim.fn["vim.lsp.omnifunc"]()) | endif
|
|
||||||
-- -- augroup END
|
|
||||||
-- -- ]]
|
|
||||||
-- vim.lsp.enable('lua_ls')
|
|
||||||
-- vim.lsp.enable('gopls', {
|
|
||||||
-- settings = {
|
|
||||||
-- gopls = {
|
|
||||||
-- analyses = {
|
|
||||||
-- unusedparams = true,
|
|
||||||
-- unusedwrite = true,
|
|
||||||
-- shadow = true,
|
|
||||||
-- },
|
|
||||||
-- staticcheck = true,
|
|
||||||
-- usePlaceholders = true,
|
|
||||||
-- hints = {
|
|
||||||
-- assignVariableTypes = true,
|
|
||||||
-- compositeLiteralFields = true,
|
|
||||||
-- compositeLiteralTypes = true,
|
|
||||||
-- functionTypeParameters = true,
|
|
||||||
-- parameterNames = true,
|
|
||||||
-- rangeVariableTypes = true,
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
-- })
|
|
||||||
-- vim.lsp.enable('nim_langserver')
|
|
||||||
-- vim.lsp.enable('pyright')
|
|
||||||
-- require("lsp_signature").setup({
|
|
||||||
-- debug = false,
|
|
||||||
-- bind = true, -- registers signature handler
|
|
||||||
-- doc_lines = 10,
|
|
||||||
-- max_height = 12,
|
|
||||||
-- max_width = function() return math.floor(vim.api.nvim_win_get_width(0) * 0.8) end,
|
|
||||||
-- wrap = true,
|
|
||||||
-- floating_window = true, -- show the popup
|
|
||||||
-- floating_window_above_cur_line = true,
|
|
||||||
-- floating_window_off_x = 1,
|
|
||||||
-- floating_window_off_y = 0,
|
|
||||||
--
|
|
||||||
-- -- IMPORTANT: don’t inline (you can change later if you want)
|
|
||||||
-- hint_enable = true,
|
|
||||||
-- hint_inline = function() return false end,
|
|
||||||
--
|
|
||||||
-- hint_prefix = "🐼 ",
|
|
||||||
-- hint_scheme = "String",
|
|
||||||
-- hi_parameter = "LspSignatureActiveParameter",
|
|
||||||
-- handler_opts = { border = "rounded" },
|
|
||||||
--
|
|
||||||
-- always_trigger = false,
|
|
||||||
-- extra_trigger_chars = { "(", "," }, -- good default
|
|
||||||
-- zindex = 200,
|
|
||||||
-- padding = "",
|
|
||||||
-- timer_interval = 200,
|
|
||||||
-- })
|
|
||||||
|
|||||||
@@ -12,14 +12,15 @@ vim.o.wildmode = "longest:full,full"
|
|||||||
vim.o.wildoptions = "pum"
|
vim.o.wildoptions = "pum"
|
||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
vim.o.termguicolors = true
|
vim.o.termguicolors = true
|
||||||
vim.o.winborder = "shadow"
|
vim.o.winborder = "rounded"
|
||||||
vim.o.clipboard = "unnamedplus"
|
vim.o.clipboard = "unnamedplus"
|
||||||
vim.o.completeopt = "menuone"
|
vim.o.completeopt = "menuone"
|
||||||
|
vim.o.shell = "/usr/bin/env zsh"
|
||||||
-- vim.o.completeopt = "menuone,noinsert,noselect"
|
-- vim.o.completeopt = "menuone,noinsert,noselect"
|
||||||
|
|
||||||
vim.o.cursorline = true
|
vim.o.cursorline = true
|
||||||
vim.o.sessionoptions="blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
|
vim.o.sessionoptions="blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
|
||||||
vim.g.netrw_keepdir = 0
|
vim.g.netrw_keepdir = 1
|
||||||
vim.g.netrw_winsize = 20
|
vim.g.netrw_winsize = 20
|
||||||
vim.g.netrw_banner = 0
|
vim.g.netrw_banner = 0
|
||||||
vim.g.netrw_localcopydircmd = 'cp -avr'
|
vim.g.netrw_localcopydircmd = 'cp -avr'
|
||||||
|
|||||||
129
lua/plugins.lua
129
lua/plugins.lua
@@ -2,7 +2,8 @@ local vim = vim
|
|||||||
local host = vim.loop.os_gethostname()
|
local host = vim.loop.os_gethostname()
|
||||||
|
|
||||||
vim.pack.add({
|
vim.pack.add({
|
||||||
{ src = "https://github.com/folke/tokyonight.nvim" },
|
-- { src = "https://github.com/folke/tokyonight.nvim" },
|
||||||
|
{ src = "https://github.com/scottmckendry/cyberdream.nvim" },
|
||||||
{ src = "https://github.com/nvim-tree/nvim-web-devicons" },
|
{ src = "https://github.com/nvim-tree/nvim-web-devicons" },
|
||||||
{ src = "https://github.com/ibhagwan/fzf-lua" },
|
{ src = "https://github.com/ibhagwan/fzf-lua" },
|
||||||
{ src = "https://github.com/echasnovski/mini.pick" },
|
{ src = "https://github.com/echasnovski/mini.pick" },
|
||||||
@@ -18,13 +19,15 @@ vim.pack.add({
|
|||||||
{ src = "https://github.com/folke/which-key.nvim" },
|
{ src = "https://github.com/folke/which-key.nvim" },
|
||||||
{ src = "https://github.com/L3MON4D3/LuaSnip" },
|
{ src = "https://github.com/L3MON4D3/LuaSnip" },
|
||||||
{ src = "https://github.com/neovim/nvim-lspconfig" },
|
{ src = "https://github.com/neovim/nvim-lspconfig" },
|
||||||
{ src = "https://github.com/hrsh7th/nvim-cmp" },
|
{ src = "https://github.com/neoclide/coc.nvim" },
|
||||||
{ src = "https://github.com/hrsh7th/cmp-nvim-lsp" },
|
{ src = "https://github.com/fannheyward/coc-pyright" },
|
||||||
{ src = "https://github.com/hrsh7th/cmp-buffer" },
|
-- { src = "https://github.com/hrsh7th/nvim-cmp" },
|
||||||
{ src = "https://github.com/hrsh7th/cmp-path" },
|
-- { src = "https://github.com/hrsh7th/cmp-nvim-lsp" },
|
||||||
{ src = "https://github.com/hrsh7th/cmp-cmdline" },
|
-- { src = "https://github.com/hrsh7th/cmp-buffer" },
|
||||||
{ src = "https://github.com/hrsh7th/cmp-nvim-lua" },
|
-- { src = "https://github.com/hrsh7th/cmp-path" },
|
||||||
{ src = "https://github.com/saadparwaiz1/cmp_luasnip" },
|
-- { src = "https://github.com/hrsh7th/cmp-cmdline" },
|
||||||
|
-- { src = "https://github.com/hrsh7th/cmp-nvim-lua" },
|
||||||
|
-- { src = "https://github.com/saadparwaiz1/cmp_luasnip" },
|
||||||
{ src = "https://github.com/github/copilot.vim" },
|
{ src = "https://github.com/github/copilot.vim" },
|
||||||
{ src = "https://github.com/pysan3/pathlib.nvim" },
|
{ src = "https://github.com/pysan3/pathlib.nvim" },
|
||||||
{ src = "https://github.com/nvim-orgmode/org-bullets.nvim" },
|
{ src = "https://github.com/nvim-orgmode/org-bullets.nvim" },
|
||||||
@@ -59,6 +62,8 @@ vim.pack.add({
|
|||||||
{ src = "https://github.com/coder/claudecode.nvim" },
|
{ src = "https://github.com/coder/claudecode.nvim" },
|
||||||
{ src = "https://github.com/yetone/avante.nvim" },
|
{ src = "https://github.com/yetone/avante.nvim" },
|
||||||
{ src = "https://github.com/alaviss/nim.nvim" },
|
{ src = "https://github.com/alaviss/nim.nvim" },
|
||||||
|
{ src = "https://github.com/glebzlat/arduino-nvim" },
|
||||||
|
{ src = "https://github.com/norcalli/nvim-colorizer.lua" },
|
||||||
})
|
})
|
||||||
|
|
||||||
if host == "xps13" then
|
if host == "xps13" then
|
||||||
@@ -72,9 +77,63 @@ require('mini.surround').setup({})
|
|||||||
require('mini.indentscope').setup({})
|
require('mini.indentscope').setup({})
|
||||||
require('mini.tabline').setup({})
|
require('mini.tabline').setup({})
|
||||||
require('mini.fuzzy').setup({})
|
require('mini.fuzzy').setup({})
|
||||||
require('lualine').setup({ options = { theme = 'tokyonight' } })
|
-- require('lualine').setup({ options = { theme = 'tokyonight' } })
|
||||||
require('which-key').setup({})
|
require('which-key').setup({})
|
||||||
require('fzf-lua').setup({})
|
require('fzf-lua').setup({
|
||||||
|
winopts = {
|
||||||
|
height = 0.85,
|
||||||
|
width = 0.80,
|
||||||
|
row = 0.35,
|
||||||
|
col = 0.50,
|
||||||
|
border = 'rounded',
|
||||||
|
preview = {
|
||||||
|
border = 'border',
|
||||||
|
wrap = 'nowrap',
|
||||||
|
hidden = 'nohidden',
|
||||||
|
vertical = 'down:45%',
|
||||||
|
horizontal = 'right:60%',
|
||||||
|
layout = 'flex',
|
||||||
|
flip_columns = 120,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
keymap = {
|
||||||
|
builtin = {
|
||||||
|
["<F1>"] = "toggle-help",
|
||||||
|
["<F2>"] = "toggle-fullscreen",
|
||||||
|
["<F3>"] = "toggle-preview-wrap",
|
||||||
|
["<F4>"] = "toggle-preview",
|
||||||
|
["<F5>"] = "toggle-preview-ccw",
|
||||||
|
["<F6>"] = "toggle-preview-cw",
|
||||||
|
["<S-down>"] = "preview-page-down",
|
||||||
|
["<S-up>"] = "preview-page-up",
|
||||||
|
["<S-left>"] = "preview-page-reset",
|
||||||
|
},
|
||||||
|
fzf = {
|
||||||
|
["ctrl-z"] = "abort",
|
||||||
|
["ctrl-u"] = "unix-line-discard",
|
||||||
|
["ctrl-f"] = "half-page-down",
|
||||||
|
["ctrl-b"] = "half-page-up",
|
||||||
|
["ctrl-a"] = "beginning-of-line",
|
||||||
|
["ctrl-e"] = "end-of-line",
|
||||||
|
["alt-a"] = "toggle-all",
|
||||||
|
["f3"] = "toggle-preview-wrap",
|
||||||
|
["f4"] = "toggle-preview",
|
||||||
|
["shift-down"] = "preview-page-down",
|
||||||
|
["shift-up"] = "preview-page-up",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
previewers = {
|
||||||
|
head = {
|
||||||
|
cmd = "head",
|
||||||
|
args = nil,
|
||||||
|
},
|
||||||
|
git_diff = {
|
||||||
|
cmd_deleted = "git show HEAD --",
|
||||||
|
cmd_modified = "git diff HEAD",
|
||||||
|
cmd_untracked = "git diff --no-index /dev/null",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
require('crates').setup({})
|
require('crates').setup({})
|
||||||
require('todo-comments').setup({
|
require('todo-comments').setup({
|
||||||
options = {
|
options = {
|
||||||
@@ -123,20 +182,24 @@ require('goto-preview').setup({ default_mappings = true })
|
|||||||
require('telescope').setup({})
|
require('telescope').setup({})
|
||||||
require('nvim-devdocs').setup({})
|
require('nvim-devdocs').setup({})
|
||||||
-- require('noice').setup({
|
-- require('noice').setup({
|
||||||
-- lsp = {
|
-- lsp = {
|
||||||
-- override = {
|
-- override = {
|
||||||
-- ["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
-- ["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||||
-- ["vim.lsp.util.stylize_markdown"] = true,
|
-- ["vim.lsp.util.stylize_markdown"] = true,
|
||||||
-- ["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp
|
-- ["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp
|
||||||
-- },
|
-- },
|
||||||
-- },
|
-- },
|
||||||
-- presets = {
|
-- presets = {
|
||||||
-- bottom_search = true, -- use a classic bottom cmdline for search
|
-- bottom_search = true, -- use a classic bottom cmdline for search
|
||||||
-- command_palette = true, -- position the cmdline and popupmenu together
|
-- command_palette = true, -- position the cmdline and popupmenu together
|
||||||
-- long_message_to_split = true, -- long messages will be sent to a split
|
-- long_message_to_split = true, -- long messages will be sent to a split
|
||||||
-- inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
-- inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
||||||
-- lsp_doc_border = false, -- add a border to hover docs and signature help
|
-- lsp_doc_border = false, -- add a border to hover docs and signature help
|
||||||
-- },
|
-- },
|
||||||
|
-- routes = {
|
||||||
|
-- view = "notify",
|
||||||
|
-- filter = { event = "msg_showmode" },
|
||||||
|
-- },
|
||||||
-- })
|
-- })
|
||||||
require("claudecode").setup({})
|
require("claudecode").setup({})
|
||||||
require('avante').setup({
|
require('avante').setup({
|
||||||
@@ -168,3 +231,21 @@ require('avante').setup({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
require('arduino-nvim').setup({
|
||||||
|
default_fqbn = "esp32:esp32:esp32",
|
||||||
|
filetypes = {"arduino"}
|
||||||
|
})
|
||||||
|
require('colorizer').setup({
|
||||||
|
'*',
|
||||||
|
}, {
|
||||||
|
RGB = true,
|
||||||
|
RRGGBB = true,
|
||||||
|
names = true,
|
||||||
|
RRGGBBAA = true,
|
||||||
|
rgb_fn = true,
|
||||||
|
hsl_fn = true,
|
||||||
|
css = true,
|
||||||
|
css_fn = true,
|
||||||
|
mode = 'background',
|
||||||
|
})
|
||||||
|
|||||||
@@ -185,3 +185,13 @@ vim.api.nvim_create_user_command("Vsplit", function()
|
|||||||
vim.cmd("vsplit")
|
vim.cmd("vsplit")
|
||||||
vim.cmd("wincmd l")
|
vim.cmd("wincmd l")
|
||||||
end, {})
|
end, {})
|
||||||
|
|
||||||
|
function _G.ShowDocumentation()
|
||||||
|
local filetype = vim.bo.filetype
|
||||||
|
if filetype == "vim" or filetype == "help" then
|
||||||
|
vim.cmd("h " .. vim.fn.expand("<cword>"))
|
||||||
|
else
|
||||||
|
vim.fn.CocActionAsync("doHover")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user