Skip to content

Commit

Permalink
fix: quickfix of lsp trying to add rope
Browse files Browse the repository at this point in the history
  • Loading branch information
rayanramoul committed Mar 5, 2024
1 parent 3f558bd commit b7b1ed2
Show file tree
Hide file tree
Showing 10 changed files with 123 additions and 14 deletions.
5 changes: 5 additions & 0 deletions dotfiles/.config/alacritty/alacritty.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ foreground = "#CDD6F4"
background = "#A6E3A1"
foreground = "#1E1E2E"


[colors.search.matches]
background = "#A6ADC8"
foreground = "#1E1E2E"
Expand All @@ -66,6 +67,10 @@ foreground = "#1E1E2E"
background = "#F5E0DC"
text = "#1E1E2E"

[colors.vi_mode_cursor]
cursor = "#B4BEFE"
text = "#1E1E2E"


[font]
size = 18
Expand Down
2 changes: 1 addition & 1 deletion dotfiles/.config/alacritty/alacritty.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ window:
cursor:
style:
shape: Beam # Supported => ▇ Block, _ Underline, | Beam
blinking: on # Supported => Never, off, on, Always
blinking: On # Supported => Never, off, on, Always
vi_mode_style: Beam
font:
size: 18
Expand Down
1 change: 1 addition & 0 deletions dotfiles/.config/nvim/after/plugin/doge.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

19 changes: 19 additions & 0 deletions dotfiles/.config/nvim/after/plugin/highlightundo.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
require('highlight-undo').setup({
duration = 300,
undo = {
hlgroup = 'HighlightUndo',
mode = 'n',
lhs = 'u',
map = 'undo',
opts = {}
},
redo = {
hlgroup = 'HighlightUndo',
mode = 'n',
lhs = '<C-r>',
map = 'redo',
opts = {}
},
highlight_for_count = true,
})

1 change: 1 addition & 0 deletions dotfiles/.config/nvim/after/plugin/hlargs.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require('hlargs').setup()
29 changes: 20 additions & 9 deletions dotfiles/.config/nvim/after/plugin/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ require('lspconfig').ruff_lsp.setup{
}
}
}


-- YAML SCHEMES
require('lspconfig').yamlls.setup {
settings = {
yaml = {
Expand All @@ -79,26 +82,23 @@ require('lspconfig').yamlls.setup {
}
-- Setup through
-- pipx install "python-lsp-server[all]"
-- pipx install python-lsp-isort pylsp-mypy python-lsp-black
-- pipx install python-lsp-isort pylsp-mypy python-lsp-black python-lsp-ruff
require"lspconfig".pylsp.setup {
filetypes = {"python"},
settings = {
configurationSources = {"flake8"},
-- configurationSources = {"flake8"},
formatCommand = {"black"},
pylsp = {
plugins = {
-- formatter options
black = { enabled = true },
autopep8 = { enabled = false },
yapf = { enabled = false },
-- linter options
pylint = { enabled = true, executable = "pylint" },
pyflakes = { enabled = false },
pycodestyle = { enabled = false },
pycodestyle = { enabled = true },
-- type checker
pylsp_mypy = { enabled = true },
-- auto-completion options
jedi_completion = { fuzzy = true },
jedi_completion = { fuzzy = false, enabled=false},
-- import sorting
pyls_isort = { enabled = true },
},
Expand All @@ -109,8 +109,9 @@ local cmp = require('cmp')
local cmp_select = {behavior = cmp.SelectBehavior.Select}
local cmp_mappings = lsp.defaults.cmp_mappings({
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
['<C-y>'] = cmp.mapping.confirm({ select = true }),
-- ['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
['<Tab>'] = cmp.mapping.select_next_item(cmp_select),
['<CR>'] = cmp.mapping.confirm({ select = true }),
["<C-Space>"] = cmp.mapping.complete(),
})

Expand Down Expand Up @@ -183,6 +184,15 @@ lsp.set_preferences({
}
})


local function quickfix()
vim.lsp.buf.code_action({
filter = function(a) return a.isPreferred end,
apply = true
})
end


lsp.on_attach(function(client, bufnr)
local opts = {buffer = bufnr, remap = false}

Expand All @@ -196,6 +206,7 @@ lsp.on_attach(function(client, bufnr)
vim.keymap.set("n", "<leader>vrr", function() vim.lsp.buf.references() end, opts)
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts)
-- vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
vim.keymap.set('n', '<leader>qf', quickfix, opts)
end)

lsp.setup()
Expand Down
5 changes: 5 additions & 0 deletions dotfiles/.config/nvim/after/plugin/lsplines.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-- Disable virtual_text since it's redundant due to lsp_lines.
-- vim.diagnostic.config({
-- virtual_text = false,
-- })
-- require("lsp_lines").setup()
11 changes: 11 additions & 0 deletions dotfiles/.config/nvim/lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,24 @@
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"copilot.vim": { "branch": "release", "commit": "57a0115908895f465eb3476f03a0aaa7096e8fe1" },
"dashboard-nvim": { "branch": "master", "commit": "413442b12d85315fc626c44a0ce4929b213ef604" },
"diffview.nvim": { "branch": "main", "commit": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f" },
"dressing.nvim": { "branch": "master", "commit": "6f212262061a2120e42da0d1e87326e8a41c0478" },
"gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" },
"guard-collection": { "branch": "main", "commit": "13e00d19f418d68977c6bc803f0d23d09dce580d" },
"guard.nvim": { "branch": "main", "commit": "4ffdefe0f181ea7e449f60fe94ccc967220181c5" },
"harpoon": { "branch": "master", "commit": "ccae1b9bec717ae284906b0bf83d720e59d12b91" },
"highlight-undo.nvim": { "branch": "main", "commit": "50a6884a8476be04ecce8f1c4ed692c5000ef0a1" },
"hlargs.nvim": { "branch": "main", "commit": "0f2dbf02ff948e8fc8ebe07b215f3174a12bbe3c" },
"hologram.nvim": { "branch": "main", "commit": "f5194f71ec1578d91b2e3119ff08e574e2eab542" },
"icon-picker.nvim": { "branch": "master", "commit": "3ee9a0ea9feeef08ae35e40c8be6a2fa2c20f2d3" },
"img-clip.nvim": { "branch": "main", "commit": "568f0d94ac934cd501040216d426d81926d2a9cb" },
"indent-blankline.nvim": { "branch": "master", "commit": "821a7acd88587d966f7e464b0b3031dfe7f5680c" },
"lazy.nvim": { "branch": "main", "commit": "aedcd79811d491b60d0a6577a9c1701063c2a609" },
"lazygit.nvim": { "branch": "main", "commit": "774dcecbd0b9b57be6c150adacb60ced79b11b23" },
"leap.nvim": { "branch": "main", "commit": "6ef54268ba9e36bf6ea92c521059041848477e7e" },
"lsp-format.nvim": { "branch": "master", "commit": "5e18095a637ec969b86c72266872219ad2f4586e" },
"lsp-zero.nvim": { "branch": "v3.x", "commit": "e0f091c97cfaff81441ccfcda0a49f4504856057" },
"lsp_lines.nvim": { "branch": "main", "commit": "3b57922d2d79762e6baedaf9d66d8ba71f822816" },
"lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" },
"lspsaga.nvim": { "branch": "main", "commit": "7cabe9468b48c8dbd4ba84536610c6ddf9b38dae" },
"lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" },
Expand All @@ -38,6 +46,8 @@
"nvim-lint": { "branch": "master", "commit": "e824adb9bc01647f71e55457353a68f0f37f9931" },
"nvim-lspconfig": { "branch": "master", "commit": "c932a56bf25167b1e88d2a1ebe35bb774b41019a" },
"nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" },
"nvim-puppeteer": { "branch": "main", "commit": "d72c7045683c0960e9ae6ae9628d0907b2cab9f3" },
"nvim-toc": { "branch": "main", "commit": "afc27debc800129c50c5b870846ce1a5c9ce4479" },
"nvim-tree.lua": { "branch": "master", "commit": "efafd73efa9bc8c26282aed563ba0f01c7465b06" },
"nvim-treesitter": { "branch": "master", "commit": "63ca90eaa3ce1cc668add8828a9e3d6728dbbdf1" },
"nvim-treesitter-context": { "branch": "master", "commit": "b8d1ffe58a88e0356da56b167373e89c4579ce15" },
Expand All @@ -53,6 +63,7 @@
"tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "bc25c56083939f274edcfe395c6ff7de23b67c50" },
"telescope.nvim": { "branch": "master", "commit": "54930e1abfc94409e1bb9266e752ef8379008592" },
"tmux.nvim": { "branch": "main", "commit": "9c02adf16ff2f18c8e236deba91e9cf4356a02d2" },
"todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" },
"undotree": { "branch": "master", "commit": "9dbbf3b7d19dda0d22ceca461818e4739ad8154d" },
"vim-doge": { "branch": "master", "commit": "622736ca29ecd6e2720623696d48179c4da430ac" },
"vim-fugitive": { "branch": "master", "commit": "ded6eb9da375dbd60f04981e5b66f0d7a2c3bcda" },
Expand Down
61 changes: 57 additions & 4 deletions dotfiles/.config/nvim/lua/ray/lazy.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
return {

return {
{'nvim-telescope/telescope.nvim', tag = '0.1.3', dependencies = { 'nvim-lua/plenary.nvim' } }, { 'rose-pine/neovim', name = 'rose-pine' }, {"nvim-treesitter/nvim-treesitter", build = ":TSUpdate",
config = function ()
config = function ()
local configs = require("nvim-treesitter.configs")

configs.setup({
Expand All @@ -14,7 +15,7 @@ return {
},
{ "lukas-reineke/indent-blankline.nvim", main = "ibl", opts = {},
config = function()
require("ibl").setup()
require("ibl").setup({indent = { highlight = highlight }})
end,
},
{'andweeb/presence.nvim'},
Expand Down Expand Up @@ -204,7 +205,8 @@ return {
dependencies = {
'nvim-treesitter/nvim-treesitter', -- optional
'nvim-tree/nvim-web-devicons', -- optional
}
},
{'nvim-tree/nvim-web-devicons'},
},
{
'windwp/nvim-autopairs',
Expand Down Expand Up @@ -236,6 +238,57 @@ return {
})
end
},
{
"chrisgrieser/nvim-puppeteer",
lazy = false, -- plugin lazy-loads itself. Can also load on filetypes.
},
{
'stevearc/dressing.nvim',
opts = {},
},
{
'tzachar/highlight-undo.nvim',
opts = {
},
},
{'sindrets/diffview.nvim'},
{'ErichDonGubler/lsp_lines.nvim'},
{
"folke/todo-comments.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
}
},
{'m-demare/hlargs.nvim'},
{'richardbizik/nvim-toc'},-- TOC: Table of Content generator
{
"ziontee113/icon-picker.nvim",
config = function()
require("icon-picker").setup({ disable_legacy_commands = true })

local opts = { noremap = true, silent = true }

vim.keymap.set("n", "<Leader><Leader>i", "<cmd>IconPickerNormal<cr>", opts)
vim.keymap.set("n", "<Leader><Leader>y", "<cmd>IconPickerYank<cr>", opts) --> Yank the selected icon into register
vim.keymap.set("i", "<C-i>", "<cmd>IconPickerInsert<cr>", opts)
end
},
{'edluffy/hologram.nvim', { }},
{
"HakonHarnes/img-clip.nvim",
event = "BufEnter",
opts = {
-- add options here
-- or leave it empty to use the default settings
},
keys = {
-- suggested keymap
{ "<leader>p", "<cmd>PasteImage<cr>", desc = "Paste clipboard image" },
}
},
}


3 changes: 3 additions & 0 deletions dotfiles/.config/nvim/lua/ray/remap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,6 @@ vim.keymap.set("n", ";", ":")

-- Doge doc generationv
vim.keymap.set("n", "<leader>doc", '<Plug>(doge-generate)')

-- Remap <C-s>
vim.keymap.set("n", "<C-s>", "<cmd>w<CR>")

0 comments on commit b7b1ed2

Please sign in to comment.