Compare commits

..

3 commits

Author SHA1 Message Date
github-actions[bot]
3ea29b1f8b automated: Update flake.lock
All checks were successful
Perform checks / formatting (pull_request) Successful in 1m8s
Perform checks / nix_flake_check (pull_request) Successful in 1m23s
Perform checks / nix_build (pull_request) Successful in 2m17s
Perform checks / formatting (push) Successful in 1m12s
Perform checks / nix_flake_check (push) Successful in 1m22s
Perform checks / nix_build (push) Successful in 1m51s
- The following Nix Flake inputs were updated:

```
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/bffc22eb12172e6db3c5dde9e3e5628f8e3e7912?narHash=sha256-8YVQ9ZbSfuUk2bUf2KRj60NRraLPKPS0Q4QFTbc%2Bc2c%3D' (2025-01-08)
  → 'github:NixOS/nixpkgs/5df43628fdf08d642be8ba5b3625a6c70731c19c?narHash=sha256-Tbk1MZbtV2s5aG%2BiM99U8FqwxU/YNArMcWAv6clcsBc%3D' (2025-01-16)
```

Auto-generated by [update.yml][1] with the help of
[create-pull-request][2].

[1]: https://forgejo.stefka.eu/jiriks74/nix.nvim/src/branch/main/.github/workflows/update.yml
[2]: https://forgejo.stefka.eu/jiriks74/create-pull-request
2025-01-18 00:01:07 +00:00
ea68d8de0b
fix: Formatting
All checks were successful
Perform checks / formatting (push) Successful in 47s
Perform checks / nix_flake_check (push) Successful in 57s
Perform checks / nix_build (push) Successful in 1m41s
2025-01-16 09:17:59 +01:00
b75e7c94f5
feat(languages): Add Python
Some checks failed
Perform checks / formatting (push) Failing after 1m3s
Perform checks / nix_flake_check (push) Successful in 1m12s
Perform checks / nix_build (push) Successful in 1m48s
2025-01-15 11:57:09 +01:00
3 changed files with 59 additions and 14 deletions

6
flake.lock generated
View file

@ -181,11 +181,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1736344531, "lastModified": 1737062831,
"narHash": "sha256-8YVQ9ZbSfuUk2bUf2KRj60NRraLPKPS0Q4QFTbc+c2c=", "narHash": "sha256-Tbk1MZbtV2s5aG+iM99U8FqwxU/YNArMcWAv6clcsBc=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "bffc22eb12172e6db3c5dde9e3e5628f8e3e7912", "rev": "5df43628fdf08d642be8ba5b3625a6c70731c19c",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -120,18 +120,27 @@ with final.pkgs.lib; let
# ^ bleeding-edge plugins from flake inputs # ^ bleeding-edge plugins from flake inputs
]; ];
extraPackages = with pkgs; [ extraPackages = with pkgs;
# Dependencies [
ripgrep # Dependencies
ripgrep
# language servers, etc. # language servers, etc.
asm-lsp # Assembly language server asm-lsp # Assembly language server
clang-tools # C/C++ language server clang-tools # C/C++ language server
(callPackage ./cpptools.nix {}) # C/C++ debugger from VSCode | https://github.com/microsoft/vscode-cpptools (callPackage ./cpptools.nix {}) # C/C++ debugger from VSCode | https://github.com/microsoft/vscode-cpptools
nodePackages.bash-language-server # Bash language server nil # nix LSP
lua-language-server nodePackages.bash-language-server # Bash language server
nil # nix LSP lua-language-server
]; ]
++ [
(pkgs.python312.withPackages (python-pkgs: [
python-pkgs.python-lsp-server
python-pkgs.python-lsp-ruff
python-pkgs.pylsp-mypy
python-pkgs.pylsp-rope
]))
];
in { in {
# This is the neovim derivation # This is the neovim derivation
# returned by the overlay # returned by the overlay

36
nvim/ftplugin/python.lua Normal file
View file

@ -0,0 +1,36 @@
-- Exit if the language server isn't available
if vim.fn.executable('pylsp') ~= 1 then
return
end
local root_files = {
'pyproject.toml',
'setup.py',
'setup.cfg',
'requirements.txt',
'Pipfile',
'pyrightconfig.json',
'.git',
}
vim.lsp.start({
name = 'python-lsp-server',
cmd = { "pylsp" },
root_dir = vim.fs.dirname(vim.fs.find(root_files, { upward = true })[1]),
capabilities = require('user.lsp').make_client_capabilities(),
filetypes = { 'python' },
on_attach = function(client, bufnr)
require("nvim-navic").attach(client, bufnr)
require("workspace-diagnostics").populate_workspace_diagnostics(client, bufnr)
end,
settings = {
pylsp = {
plugins = {
mypy = { enabled = true, },
rope = { enabled = true, },
ruff = { enabled = true, },
},
},
},
single_file_support = true
})