profile
viewpoint

tiagovla/lspconfigplus.nvim 1

This plugin extends the functionality of nvim-lspconfig allowing asynchronous installation, update and removal of language servers.

tiagovla/AAXtoMP3 0

Convert Audible's .aax filetype to MP3, FLAC, M4A, or OPUS

tiagovla/auto-session 0

A small automated session manager for Neovim

tiagovla/DeDRM_tools 0

DeDRM tools for ebooks

PR opened L3MON4D3/LuaSnip

docs: fix typo

I was reading the docs when I found this small typo.

+1 -1

0 comment

1 changed file

pr created time in 17 hours

create barnchtiagovla/LuaSnip

branch : fix_typo

created branch time in 17 hours

fork tiagovla/LuaSnip

Snippet Engine for Neovim written in Lua.

fork in 17 hours

push eventtiagovla/.dotfiles

tiagovla

commit sha 297033b7bff998f8caf65d5374a785dd8c790493

fix(efm): fix efm+texlab conflict

view details

tiagovla

commit sha 69ffd5f2fb88623ea8c23ba6b092f6faee1979f7

fix: do not expand with tab

view details

tiagovla

commit sha f0a8aa797caeaf0bae45b8cfe82a9bbba3ce15e4

fix: disable history and events

view details

tiagovla

commit sha 843a2fa265abf69cb027aa3963dc35099acfbe58

perf: remove unused snips

view details

push time in 2 days

startedActivityWatch/activitywatch

started time in 4 days

push eventtiagovla/.dotfiles

tiagovla

commit sha 0ec982384c8c052a48cd471f9580f3e57ff41b16

fix(bspwm): qBittorrent tiled

view details

push time in 7 days

startedretorquere/zotero-better-bibtex

started time in 10 days

push eventtiagovla/.dotfiles

tiagovla

commit sha 197424e72c358016b6770c9b22462af642dee99f

perf(bspwm): remove unused rules

view details

push time in 10 days

push eventtiagovla/tokyodark.nvim

tiagovla

commit sha 3478be4564c3e95695f97b615f4d5e39ca9f0bf5

feat: add nvim-cmp support

view details

push time in 11 days

issue closedlatex-lsp/texlab

Luasnip + texlab not working properly

Problem

After using a lua snippet and saving, if I leave the next insert mode a copy of the document will be pasted.

gifcast_211107195853

I noticed it only happens with texlab, it works fine with pyright. Also the issue is related to the formatter, it won't happen if it's disabled. I tried to use efm to format instead, but texlab + efm don't work together #485.

System

  • Neovim: NVIM v0.6.0-dev+563-gb74916cfd
  • TexLab 3.3.0
  • Arch

Minimal config

vim.cmd [[packadd packer.nvim]]

require("packer").startup(function()
    use { "wbthomason/packer.nvim" }
    use { "hrsh7th/cmp-path" }
    use { "rafamadriz/friendly-snippets" }
    use { "L3MON4D3/LuaSnip" }
    use {
        "hrsh7th/nvim-cmp",
        config = function()
            local cmp = require "cmp"
            local mapping = {
                ["<C-Space>"] = cmp.mapping.complete(),
                ["<C-e>"] = cmp.mapping.close(),
                ["<CR>"] = cmp.mapping.confirm {
                    behavior = cmp.ConfirmBehavior.Replace,
                    select = true,
                },
            }
            cmp.setup {
                snippet = {
                    expand = function(args)
                        require("luasnip").lsp_expand(args.body)
                    end,
                },
                mapping = mapping,
                completion = { completeopt = "menu,menuone,noinsert" },
                sources = {
                    { name = "luasnip" },
                    { name = "path" },
                },
            }
        end,
    }
    use {
        "neovim/nvim-lspconfig",
        config = function()
            require("lspconfig").texlab.setup {
                cmd = { "/path/to/texlab" },
                log_level = vim.lsp.protocol.MessageType.Log,
                message_level = vim.lsp.protocol.MessageType.Log,
                settings = {
                    texlab = {
                        diagnosticsDelay = 50,
                        -- latexFormatter = "texlab",
                        build = {
                            executable = "latexmk",
                            args = {
                                "-pdf",
                                "-interaction=nonstopmode",
                                "-pvc",
                                "-synctex=1",
                                "-shell-escape",
                                "%f",
                            },
                        },
                        forwardSearch = {
                            args = { "--synctex-forward", "%l:1:%f", "%p" },
                            executable = "zathura",
                        },
                        chktex = { onOpenAndSave = true, onEdit = false },
                        formatterLineLength = 120,
                    },
                },
            }
        end,
    }
    use { "saadparwaiz1/cmp_luasnip" }
end)

-- it also happens manually using the command
vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.formatting_sync(nil, 1000)]]

require("luasnip/loaders/from_vscode").lazy_load()

Log

lsp.log

closed time in 15 days

tiagovla

issue commentlatex-lsp/texlab

Luasnip + texlab not working properly

Since it seems to be a client/plugin issue and not a texlab issue. I'm closing it.

tiagovla

comment created time in 15 days

issue commentlatex-lsp/texlab

Luasnip + texlab not working properly

Texlab does not sync the buffer, unless it's directly writing to disk (which I think it does not). We (neovim) synchronize the buffer. If you use formatting_sync we should block on formatting. I'll look at this later but I can't easily reproduce your issue.

Not even with the docker files above?

tiagovla

comment created time in 16 days

issue commentlatex-lsp/texlab

Luasnip + texlab not working properly

Yes, it only happens after triggering a snippet insertion. It does not happen using efm to format it instead of texlab, that's why I assume it's related to how texlab is syncing the buffer after formatting it.

If there was a way to avoid the error after sending textDocument/build to efm so I could disable texlab formatting, it would work just fine for me.

tiagovla

comment created time in 16 days

issue commentlatex-lsp/texlab

Luasnip + texlab not working properly

Obviously it does not happen.

tiagovla

comment created time in 16 days

issue commentlatex-lsp/texlab

Luasnip + texlab not working properly

I am almost certain vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.formatting_sync(nil, 1000)]] is the issue. Try removing this. Also this seems like a neovim plugin issue rather than a texlab issue and should be closed IMO.

@mjlbach How exactly should I format it instead? Removing that autocmd and manually using :lua vim.lsp.buf.formatting_sync() gives me the same behavior.

I also opened the issue here because it doesn't happen with efm, and it seems to be related to latexindent.

tiagovla

comment created time in 16 days

issue commentneovim/nvim-lspconfig

Texlab and Efm together causes error when calling `TexlabBuild`.

I built from master today and it still gives me this:

Error executing vim.schedule lua callback: .../pack/packer/opt/nvim-lspconfig/lua/lsp
config/texlab.lua:30: RPC[Error] code_name = MethodNotFound, message = "method not su
pported: textDocument/build"
stack traceback:
        [C]: in function 'error'
        .../pack/packer/opt/nvim-lspconfig/lua/lspconfig/texlab.lua:30: in function '
handler'
        /usr/local/share/nvim/runtime/lua/vim/lsp.lua:927: in function 'cb'
        vim.lua:285: in function <vim.lua:285>

I'm trying to get efm and texlab to work together because texlab is not working properly with luasnip https://github.com/latex-lsp/texlab/issues/503.

riazufila

comment created time in 16 days

issue commentL3MON4D3/LuaSnip

LuaSnip + texlab not working properly

This is using efm to format instead of texlab:

1
false false
3 0
3 9
2
false true
3 9
3 11
3
true false
3 11
4 11
4
false false
4 11
4 13
5
false false
4 13
5 0
6
false false
5 0
5 0
7
false false
5 0
5 0
8
false false
5 0
6 10
9
false false
6 10
6 22
10
false false
6 22
6 28

Is this the normal behavior? Efm does not duplicate it, only texlab does that.

tiagovla

comment created time in 16 days

issue commentL3MON4D3/LuaSnip

LuaSnip + texlab not working properly

\documentclass{article}

\begin{document}
\section{ok} % (fold)
\label{sec:ok}

% section section name (end)

\documentclass{article}

\begin{document}
\section{ok} % (fold)
\label{sec:ok}

% section section name (end)

\end{document}
tiagovla

comment created time in 16 days

issue commentlatex-lsp/texlab

Luasnip + texlab not working properly

I did try to set allow_incremental_sync=false yesterday and it still happens.

tiagovla

comment created time in 16 days

issue commentL3MON4D3/LuaSnip

LuaSnip + texlab not working properly

:lua Luasnip_current_nodes[vim.api.nvim_get_current_buf()].parent:dump():

E5108: Error executing lua [string ":lua"]:1: attempt to index global 'Luasnip_curren
t_nodes' (a nil value)
stack traceback:
        [string ":lua"]:1: in main chunk

:lua require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()].parent:dump()

1
false false
0 0
0 0
2
false true
0 0
17 0
3
true false
17 0
0 0
4
false false
0 0
8 0
5
false false
8 0
8 0
6
false false
8 0
8 0
7
false false
8 0
8 0
8
false false
8 0
8 0
9
false false
8 0
8 0
10
false false
8 0
8 0
tiagovla

comment created time in 16 days

startedneovim/neovim

started time in 16 days

issue openedL3MON4D3/LuaSnip

LuaSnip + texlab not working properly

I opened this issue https://github.com/latex-lsp/texlab/issues/503, but I'm not sure if it's texlab that's causing the problem. I noticed that it only happens if I don't jump to all fields and escape. Could this be related to luasnip or nvim-cmp?

created time in 17 days

push eventtiagovla/.dotfiles

tiagovla

commit sha aa97248d7c68509db1efc638da7276b4b42eb7c0

chore: update package list

view details

push time in 18 days

push eventtiagovla/nodal_dg

tiagovla

commit sha a543732652ae3c3db265fe79fae145351430ae43

wip: working 1

view details

tiagovla

commit sha 363df8ec697f037783ac89e4564c89372783abf8

wip: working 2

view details

tiagovla

commit sha 9409ded8874dc1b02af898a7b58e243df2244e1f

wip: changes

view details

tiagovla

commit sha 2a8fdba280600f466753952f22a776254045665e

wip: working too

view details

tiagovla

commit sha f40cdc0a65f1802c6ec3d667c829cdbaffced0e6

wip: pres

view details

tiagovla

commit sha b67fb45d8642f0e266b4cd742460c50a3b434d48

wip: goingoing

view details

push time in 18 days

push eventtiagovla/tokyodark.nvim

tiagovla

commit sha 3ac4f82813d800590cccb3c6dae2f3cfde5fd75d

doc: fix logo url

view details

push time in 18 days

push eventtiagovla/.dotfiles

tiagovla

commit sha f3d1a70d5f0a9e1a3ad8a97f7fcecce34c6a5ff5

feat(x): add x config

view details

tiagovla

commit sha 9998731401dafd98d82e94346337a533140a7aeb

feat(zsh): add zsh config

view details

push time in 18 days

push eventtiagovla/.dotfiles

tiagovla

commit sha 1f0c509e7e3134ef0644837270e830278f163a41

feat(mpv): set quality to 480p

view details

tiagovla

commit sha 3938049b00250c5eb98a7d51d4aa3e21e75af47b

fix(lsp): fix lsp signs

view details

tiagovla

commit sha a775cb3ba567df663761ab27e9b2fc260a4570ab

perf(dap): simplify settings

view details

tiagovla

commit sha b987de1e079c2aa1fb7bfa7d566b5f7cd65b58a4

fix(theme): use pcall to load theme

view details

tiagovla

commit sha 73e5a7280e6a069d524326939efae51c36f6101c

fix(cmp): change expand_or_jumpable to only jumpable

view details

tiagovla

commit sha 2fedde2f5d169ceea7179e6cb66ea853c2623bb8

fix(tmux): reload binding

view details

tiagovla

commit sha 35fbb5116aba2f2407e1494e450b73f3a4b7e062

feat(rofi): new layout

view details

tiagovla

commit sha d60e14c2f93b3514dc1cf858611921af92f65305

chore(plugins): change config

view details

tiagovla

commit sha 6ba269c9cf81d98c58d8fb208d7ff876af803e7d

chore: remove unused exports

view details

tiagovla

commit sha 68c2b3e26c534643a9451de041c25ebd7bb24d02

feat: packages installed

view details

tiagovla

commit sha 69fda02f6a85cfaa12b5f8569ee605050d20e7f9

fix(sxhkd): change settings

view details

push time in 18 days

push eventtiagovla/grammarly.docker

tiagovla

commit sha b4d7ddacfec77434e654ae6c41c11d9b1ca861a8

doc: add config sample

view details

push time in 18 days

startedkhanhas/spicetify-cli

started time in 18 days

more