Skip to content

Commit

Permalink
Add zed
Browse files Browse the repository at this point in the history
  • Loading branch information
serverwentdown committed May 8, 2024
1 parent e87ebf4 commit ee8670c
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .config/nvim/lua/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ local on_attach = function(bufnr)
-- Mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
local bufopts = { noremap=true, silent=true, buffer=bufnr }
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts)
-- vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
Expand All @@ -25,11 +25,11 @@ local on_attach = function(bufnr)
vim.keymap.set('n', '<space>wl', function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, bufopts)
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, bufopts)
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, bufopts)
vim.keymap.set('n', 'gD', vim.lsp.buf.type_definition, bufopts)
vim.keymap.set('n', 'cd', vim.lsp.buf.rename, bufopts)
vim.keymap.set('n', '<space>ca', vim.lsp.buf.code_action, bufopts)
vim.keymap.set('n', '<space>x', vim.lsp.codelens.run, bufopts)
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
vim.keymap.set('n', 'gA', vim.lsp.buf.references, bufopts)
vim.keymap.set('n', '<space>f', function() vim.lsp.buf.format { async = true } end, bufopts)
end
vim.api.nvim_create_autocmd('LspAttach', {
Expand Down
15 changes: 15 additions & 0 deletions .config/zed/keymap.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[
{
"context": "Editor && vim_mode == normal && !VimWaiting && !menu",
"bindings": {
"space b": "workspace::ToggleLeftDock"
}
},
{
"context": "ProjectPanel && not_editing",
"bindings": {
"space b": "workspace::ToggleLeftDock",
"ctrl-w l": "project_panel::ToggleFocus"
}
}
]
13 changes: 13 additions & 0 deletions .config/zed/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run the `open default settings` command
// from the command palette or from `Zed` application menu.
{
"vim_mode": true,
"ui_font_size": 15,
"buffer_font_size": 15
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
!.config/wofi
!.config/yabai
!.config/yadm
!.config/zed
.config/zed/.tmp*
!.config/zsh-completions
.config/zsh-completions/*
!.config/zsh-completions/download.sh
Expand Down

0 comments on commit ee8670c

Please sign in to comment.