Activated Noice
This commit is contained in:
@@ -139,6 +139,9 @@ 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" })
|
||||
|
||||
117
lua/lsp.lua
117
lua/lsp.lua
@@ -40,64 +40,6 @@ 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({
|
||||
debug = false,
|
||||
@@ -123,62 +65,3 @@ require("lsp_signature").setup({
|
||||
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')
|
||||
-- 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,
|
||||
-- })
|
||||
|
||||
@@ -54,7 +54,7 @@ vim.pack.add({
|
||||
{ src = "https://github.com/nvim-telescope/telescope-project.nvim"},
|
||||
{ src = "https://github.com/nvim-telescope/telescope-ui-select.nvim" },
|
||||
{ src = "https://github.com/luckasRanarison/nvim-devdocs" },
|
||||
-- { src = "https://github.com/folke/noice.nvim" },
|
||||
{ src = "https://github.com/folke/noice.nvim" },
|
||||
{ src = "https://github.com/mbbill/undotree.git" },
|
||||
{ src = "https://github.com/francoiscabrol/ranger.vim" },
|
||||
{ src = "https://github.com/folke/snacks.nvim" },
|
||||
@@ -124,22 +124,22 @@ require('barbar').setup({})
|
||||
require('goto-preview').setup({ default_mappings = true })
|
||||
require('telescope').setup({})
|
||||
require('nvim-devdocs').setup({})
|
||||
-- require('noice').setup({
|
||||
-- lsp = {
|
||||
-- override = {
|
||||
-- ["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||
-- ["vim.lsp.util.stylize_markdown"] = true,
|
||||
-- ["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp
|
||||
-- },
|
||||
-- },
|
||||
-- presets = {
|
||||
-- bottom_search = true, -- use a classic bottom cmdline for search
|
||||
-- command_palette = true, -- position the cmdline and popupmenu together
|
||||
-- long_message_to_split = true, -- long messages will be sent to a split
|
||||
-- inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
||||
-- lsp_doc_border = false, -- add a border to hover docs and signature help
|
||||
-- },
|
||||
-- })
|
||||
require('noice').setup({
|
||||
lsp = {
|
||||
override = {
|
||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||
["vim.lsp.util.stylize_markdown"] = true,
|
||||
["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp
|
||||
},
|
||||
},
|
||||
presets = {
|
||||
bottom_search = true, -- use a classic bottom cmdline for search
|
||||
command_palette = true, -- position the cmdline and popupmenu together
|
||||
long_message_to_split = true, -- long messages will be sent to a split
|
||||
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
||||
lsp_doc_border = false, -- add a border to hover docs and signature help
|
||||
},
|
||||
})
|
||||
require("claudecode").setup({})
|
||||
require('avante').setup({
|
||||
opts = {
|
||||
|
||||
Reference in New Issue
Block a user