Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
fix(docker,lsp,core): Dockerfile, lsp warning and preserve_edit_pos (#…
Browse files Browse the repository at this point in the history
…371)

* chore(.gitignore): contribute got renamed to tools

delete packer_compiled.lua: this should not be commited!

Signed-off-by: Edwin Török <edwin@etorok.net>

* chore(Dockerfile): add luacheck/stylua

* chore(init.lua): fix luacheck warnings

Delete dead code

Signed-off-by: Edwin Török <edwin@etorok.net>

* chore(contribute): do not move branch in detached HEAD state

When rebasing / bisecting / etc. the worktree would be in a detached
HEAD state.
Do not checkout the branch because this would unexpectedly move the
currently checked out commit.
Especially important if we want to compare performance one-by-one by
rebasing in edit mode.

Signed-off-by: Edwin Török <edwin@etorok.net>

* chore: fix contribute/start_docker

pacman was stopping and asking a question,
needs noconfirm flag.
Directories mounted as volumes need to be created on first use.
'make' needs to be installed otherwise nvim-treesitter fails to compile
the treesitter parsers and hangs at 'Compiling' (sync_install=true can
be used to show actual error).

Signed-off-by: Edwin Török <edwin@etorok.net>

* fix(preserve_edit_pos): do not jump to last position in git commit/rebase buffers

See ':h last-position-jump'

The commit message will likely be different each time, although the
filename will be the same (`COMMIT_EDITMSG`).

Signed-off-by: Edwin Török <edwin@etorok.net>

* fix(lsp): do not use deprecated vim.lsp.diagnostic APIs

Use the vim.diagnostic API instead, see :h deprecated.
Otherwise a message is printed on every use that they are deprecated.

Signed-off-by: Edwin Török <edwin@etorok.net>
  • Loading branch information
edwintorok authored Aug 1, 2022
1 parent 0294e7c commit e0a3a11
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 397 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ tags
# OS files
.DS_Store
# Doom Nvim Contrib files
contribute/doom-nvim-contrib
contribute/local-share-nvim
contribute/workspace
tools/doom-nvim-contrib
tools/local-share-nvim
tools/workspace

# User modules
user/modules/*
Expand Down
2 changes: 1 addition & 1 deletion lua/doom/modules/core/doom/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ required.autocmds = function()
table.insert(autocmds, {
"BufReadPost",
"*",
[[if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif]],
[[if &ft !~# 'commit\|rebase' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif]],
})
end
return autocmds
Expand Down
2 changes: 0 additions & 2 deletions lua/doom/modules/core/nest/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ mapper.configs["nvim-mapper"] = function()
if id ~= nil then
local rhs = type(node.rhs) == "function" and "<function>" or node.rhs
if node_settings.buffer then
local bufnr = type(node_settings.buffer) == "number" and node_settings.buffer
or vim.api.nvim_get_current_buf()
Mapper.map_buf_virtual(
sanitizedMode,
node.lhs,
Expand Down
3 changes: 1 addition & 2 deletions lua/doom/modules/features/lsp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ lsp.settings = {
},
}

local is_module_enabled = require("doom.utils").is_module_enabled
lsp.packages = {
["nvim-lspconfig"] = {
"neovim/nvim-lspconfig",
Expand Down Expand Up @@ -377,7 +376,7 @@ lsp.binds = {
end,
name = "Line",
},
{ "l", vim.lsp.diagnostic.set_loclist, name = "Loclist" },
{ "l", vim.diagnostic.setloclist, name = "Loclist" },
},
},
},
Expand Down
5 changes: 4 additions & 1 deletion tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ RUN pacman -Sy neovim --noconfirm
# Install runtime dependencies of doom-nvim
RUN pacman -Sy ripgrep nodejs-lts-fermium npm git bash gcc jq --noconfirm

# Lua
RUN pacman -Sy luacheck stylua --noconfirm

# Required for nvim-lsp-installer
RUN pacman -Sy wget unzip
RUN pacman -Sy wget unzip make --noconfirm

# Required for watching Doom-nvim-contrib for changes
RUN npm i -g chokidar-cli
Expand Down
203 changes: 0 additions & 203 deletions tools/local-share-nvim/plugin/packer_compiled.lua

This file was deleted.

This file was deleted.

47 changes: 0 additions & 47 deletions tools/local-share-nvim/sessions/%home%doom%.config%nvim.vim

This file was deleted.

Loading

0 comments on commit e0a3a11

Please sign in to comment.